All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alsa: fix compilation warning in GCC
@ 2007-12-31 23:51 Miguel Botón
  0 siblings, 0 replies; only message in thread
From: Miguel Botón @ 2007-12-31 23:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: perex

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@gmail.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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-31 23:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-31 23:51 [PATCH] alsa: fix compilation warning in GCC Miguel Botón

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.