summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-11-24 15:39:10 +0100
committerFelipe Balbi <balbi@ti.com>2014-11-25 15:46:53 +0100
commit23fba80a9b1a36654078e29f4df73f07793154fa (patch)
treef6fc83732036654f957c80fb40f53530fc666f9c /drivers/usb/gadget
parentusb: dwc3: return error code from the most recent call (diff)
downloadlinux-23fba80a9b1a36654078e29f4df73f07793154fa.tar.xz
linux-23fba80a9b1a36654078e29f4df73f07793154fa.zip
usb: gadget: udc: lpc32xx: remove unnecessary NULL check
debugfs_remove() is safe against NULL pointers, so let's remove the unnecessary NULL check before calling it. Acked-by: Peter Chen <peter.chen@freeescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/udc/lpc32xx_udc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index 4be497d39d91..976529631c19 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -582,8 +582,7 @@ static void create_debug_file(struct lpc32xx_udc *udc)
static void remove_debug_file(struct lpc32xx_udc *udc)
{
- if (udc->pde)
- debugfs_remove(udc->pde);
+ debugfs_remove(udc->pde);
}
#else