diff options
author | Dan Carpenter <error27@gmail.com> | 2009-11-18 03:31:57 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-18 03:59:40 -0500 |
commit | bec145ae6f6978f0319e5600a742f45f76ecc4dd (patch) | |
tree | 6ba70348a7fa3d6a49ec61df7b35f885451da1e3 /sound/core/control.c | |
parent | 67f2db24fbfdb63495d995d6fbbbe42980004ee0 (diff) |
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 <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index a8b7fabe645e..b586019faf3f 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, | |||
1120 | goto __kctl_end; | 1120 | goto __kctl_end; |
1121 | } | 1121 | } |
1122 | if (vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { | 1122 | if (vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { |
1123 | if (file && vd->owner != NULL && vd->owner != file) { | 1123 | if (vd->owner != NULL && vd->owner != file) { |
1124 | err = -EPERM; | 1124 | err = -EPERM; |
1125 | goto __kctl_end; | 1125 | goto __kctl_end; |
1126 | } | 1126 | } |