debugfs_remove() is safe against NULL pointers, so
let's remove the unnecessary NULL check before
calling it.

Cc: Peter Chen <peter.c...@freescale.com>
Cc: Jingoo Han <jg1....@samsung.com>
Signed-off-by: Felipe Balbi <ba...@ti.com>
---
 drivers/usb/gadget/udc/lpc32xx_udc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c 
b/drivers/usb/gadget/udc/lpc32xx_udc.c
index 4be497d..9765296 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
-- 
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to