usb: gadget: udc: lpc32xx: remove unnecessary NULL check
authorFelipe Balbi <balbi@ti.com>
Mon, 24 Nov 2014 14:39:10 +0000 (08:39 -0600)
committerFelipe Balbi <balbi@ti.com>
Tue, 25 Nov 2014 14:46:53 +0000 (08:46 -0600)
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>
drivers/usb/gadget/udc/lpc32xx_udc.c

index 4be497d39d91d7030fa880ee75635999a1f93844..976529631c19542b1b15ffc7588e7049b23c8bbf 100644 (file)
@@ -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