debugfs_remove() is safe against NULL pointers, so let's remove the unnecessary NULL check before calling it. Cc: Daniel Mack <daniel@xxxxxxxxxx> Cc: Robert Jarzmik <robert.jarzmik@xxxxxxx> Signed-off-by: Felipe Balbi <balbi@xxxxxx> --- drivers/usb/gadget/udc/pxa25x_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index 8664b99..6b4d47b 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -1136,8 +1136,7 @@ static const struct file_operations debug_fops = { } while (0) #define remove_debug_files(dev) \ do { \ - if (dev->debugfs_udc) \ - debugfs_remove(dev->debugfs_udc); \ + debugfs_remove(dev->debugfs_udc); \ } while (0) #else /* !CONFIG_USB_GADGET_DEBUG_FILES */ -- 2.1.0.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html