Commit 4db9917b authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: udc: pxa25x: remove unnecessary NULL check

debugfs_remove() is safe against NULL pointers, so
let's remove the unnecessary NULL check before
calling it.
Reviewed-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 23fba80a
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment