diff options
author | Sudip Mukherjee | 2015-09-22 18:54:28 +0530 |
---|---|---|
committer | Felipe Balbi | 2015-10-01 12:40:20 -0500 |
commit | 2e1b7d0c691c63c66d5bf5c097243f3b037adf32 (patch) | |
tree | 3a2648fd4a46cb3897197e6931bb89de32b9cda3 /drivers/usb/gadget | |
parent | 580693bb3b66ce299f85f71dee60734438b1cd79 (diff) |
usb: gadget: amd5536udc: use WARN_ON
Use WARN_ON() instead of halting the kernel with BUG_ON() and also fix
the checkpatch warning.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/amd5536udc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c index 3f85044be196..6223b1be029f 100644 --- a/drivers/usb/gadget/udc/amd5536udc.c +++ b/drivers/usb/gadget/udc/amd5536udc.c @@ -3127,7 +3127,8 @@ static void udc_pci_remove(struct pci_dev *pdev) usb_del_gadget_udc(&udc->gadget); /* gadget driver must not be registered */ - BUG_ON(dev->driver != NULL); + if (WARN_ON(dev->driver)) + return; /* dma pool cleanup */ if (dev->data_requests) |