Skip to contentSkip to conversation

alsa: fix compilation warning in GCC

PATCH New Miguel Botón 1 participant 1 message Dec 31, 2007 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

sound/core/init.c +1 -1
index 48d38a7..2215ba8 100644
@@ -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;
 	}
Signature · 1 line
	Miguel Botón