usb: gadget: f_uac1: remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 8 Oct 2014 10:40:37 +0000 (13:40 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Nov 2014 16:00:59 +0000 (10:00 -0600)
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>
drivers/usb/gadget/function/u_uac1.c

index a44a07f30281ed09c527809d0526b7db06bd0628..53842a1b947fc34a9dd69b915d1f10c2e647685a 100644 (file)
@@ -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);