usb: gadget: udc: pxa25x: remove unnecessary NULL check
authorFelipe Balbi <balbi@ti.com>
Mon, 24 Nov 2014 14:40:01 +0000 (08:40 -0600)
committerFelipe Balbi <balbi@ti.com>
Tue, 25 Nov 2014 14:47:04 +0000 (08:47 -0600)
debugfs_remove() is safe against NULL pointers, so
let's remove the unnecessary NULL check before
calling it.

Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/pxa25x_udc.c

index 8664b99f147f822872540fdb5a47a96cd1af390d..347a05b5afc1fbbc412542f7e5bafea668ee1fa0 100644 (file)
@@ -1134,11 +1134,7 @@ static const struct file_operations debug_fops = {
                dev->debugfs_udc = debugfs_create_file(dev->gadget.name, \
                        S_IRUGO, NULL, dev, &debug_fops); \
        } while (0)
-#define remove_debug_files(dev) \
-       do { \
-               if (dev->debugfs_udc) \
-                       debugfs_remove(dev->debugfs_udc); \
-       } while (0)
+#define remove_debug_files(dev) debugfs_remove(dev->debugfs_udc)
 
 #else  /* !CONFIG_USB_GADGET_DEBUG_FILES */