Skip to content

Commit

Permalink
[ALSA] fix compilation warning in GCC
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Miguel Boton authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 52a1d4f commit bc9abce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,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;
}
Expand Down

0 comments on commit bc9abce

Please sign in to comment.