lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 1 Jan 2008 00:51:30 +0100
From:	Miguel Botón <mboton.lkml@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	perex@...ex.cz
Subject: [PATCH] alsa: fix compilation warning in GCC

This is just a little patch to shut up GCC.

'snd_shutdown_f_ops' is not a pointer so its address will never be NULL.
GCC will complain because 'fops_get' will do an unnecessary check because
'&snd_shutdown_f_ops' is always true.

Signed-off-by: Miguel Botón <mboton@...il.com>

diff --git a/sound/core/init.c b/sound/core/init.c
index 48d38a7..2215ba8 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -340,8 +340,8 @@ int snd_card_disconnect(struct snd_card *card)
 		list_add(&mfile->shutdown_list, &shutdown_files);
 		spin_unlock(&shutdown_lock);
 
-		fops_get(&snd_shutdown_f_ops);
 		mfile->file->f_op = &snd_shutdown_f_ops;
+		fops_get(mfile->file->f_op);
 		
 		mfile = mfile->next;
 	}

-- 
	Miguel Botón
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ