From bec145ae6f6978f0319e5600a742f45f76ecc4dd Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 18 Nov 2009 10:31:57 +0200 Subject: ALSA: remove unnecessary null check This function is only called from snd_ctl_ioctl() and the file parameter can never be null so there is no need to check it here. We dereference file at the start of the function: struct snd_card *card = file->card; and it confuses static checkers to dereference a pointer before checking it. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- sound/core/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/core') diff --git a/sound/core/control.c b/sound/core/control.c index a8b7fabe645..b586019faf3 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1120,7 +1120,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file, goto __kctl_end; } if (vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { - if (file && vd->owner != NULL && vd->owner != file) { + if (vd->owner != NULL && vd->owner != file) { err = -EPERM; goto __kctl_end; } -- cgit