From: Felipe Balbi Date: Mon, 24 Nov 2014 14:39:10 +0000 (-0600) Subject: usb: gadget: udc: lpc32xx: remove unnecessary NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23fba80a9b1a36654078e29f4df73f07793154fa;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Felipe Balbi --- 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