Skip to content

Commit bc9abce

Browse files
Miguel Botonperexg
authored andcommitted
[ALSA] fix compilation warning in 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 Boton <mboton@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent 52a1d4f commit bc9abce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎sound/core/init.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ int snd_card_disconnect(struct snd_card *card)
339339
list_add(&mfile->shutdown_list, &shutdown_files);
340340
spin_unlock(&shutdown_lock);
341341

342-
fops_get(&snd_shutdown_f_ops);
343342
mfile->file->f_op = &snd_shutdown_f_ops;
343+
fops_get(mfile->file->f_op);
344344

345345
mfile = mfile->next;
346346
}

0 commit comments

Comments
 (0)