]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: gadget: ci13xx_udc: fix potential crash in irq handler
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 18:37:18 +0000 (11:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 18:37:18 +0000 (11:37 -0700)
As pointed out by Dan Carpenter, we should not be trying to call
dev_err() on a structure that was previously determined to be NULL,
that's just foolish and asking for trouble.

So just delete the message, it's not going to do anyone any good to have
it anyway.

This problem was caused by 0f089094cde5: "usb: gadget: ci13xxx: replace
home-brewed logging with dev_{err,warn,info}"

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/ci13xxx_udc.c

index 560b539b9def037378c0405442a1fc69b21e0d76..5bd95b0a23d71e5d0ac2d2c9b7c082ffef32abd0 100644 (file)
@@ -2719,10 +2719,8 @@ static irqreturn_t udc_irq(int irq, void *data)
 
        trace(udc ? udc->dev : NULL, "");
 
-       if (udc == NULL) {
-               dev_err(udc->dev, "ENODEV");
+       if (udc == NULL)
                return IRQ_HANDLED;
-       }
 
        spin_lock(&udc->lock);