summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-10-08 14:40:37 +0400
committerFelipe Balbi <balbi@ti.com>2014-11-03 19:00:59 +0300
commit60b388befb42d1e90a8594cdcfe80dbf57542ac0 (patch)
treefe27b9ae6f8eb9bdcc07ab0a60e8add6f296790e /drivers/usb/gadget
parent0abd0696982534a5cf75e8129989fa3d4b734797 (diff)
downloadlinux-60b388befb42d1e90a8594cdcfe80dbf57542ac0.tar.xz
usb: gadget: f_uac1: remove an unneeded NULL check
This NULL check sets off a static checker warning because we already dereferenced "card" earlier in the function. However, since "card" is never NULL so we can just remove the check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/function/u_uac1.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/u_uac1.c b/drivers/usb/gadget/function/u_uac1.c
index a44a07f30281..53842a1b947f 100644
--- a/drivers/usb/gadget/function/u_uac1.c
+++ b/drivers/usb/gadget/function/u_uac1.c
@@ -213,9 +213,6 @@ static int gaudio_open_snd_dev(struct gaudio *card)
fn_cap = opts->fn_cap;
fn_cntl = opts->fn_cntl;
- if (!card)
- return -ENODEV;
-
/* Open control device */
snd = &card->control;
snd->filp = filp_open(fn_cntl, O_RDWR, 0);