aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-11-24 09:40:01 -0500
committerFelipe Balbi <balbi@ti.com>2014-11-25 09:47:04 -0500
commit4db9917b641d18d24932ee2ec95b23a1e26c3f7e (patch)
treeefb5b798a3295f21de965fd96fe8c246850131be
parent23fba80a9b1a36654078e29f4df73f07793154fa (diff)
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: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/gadget/udc/pxa25x_udc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 8664b99f147f..347a05b5afc1 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -1134,11 +1134,7 @@ static const struct file_operations debug_fops = {
1134 dev->debugfs_udc = debugfs_create_file(dev->gadget.name, \ 1134 dev->debugfs_udc = debugfs_create_file(dev->gadget.name, \
1135 S_IRUGO, NULL, dev, &debug_fops); \ 1135 S_IRUGO, NULL, dev, &debug_fops); \
1136 } while (0) 1136 } while (0)
1137#define remove_debug_files(dev) \ 1137#define remove_debug_files(dev) debugfs_remove(dev->debugfs_udc)
1138 do { \
1139 if (dev->debugfs_udc) \
1140 debugfs_remove(dev->debugfs_udc); \
1141 } while (0)
1142 1138
1143#else /* !CONFIG_USB_GADGET_DEBUG_FILES */ 1139#else /* !CONFIG_USB_GADGET_DEBUG_FILES */
1144 1140