summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-11-24 08:40:01 -0600
committerFelipe Balbi <balbi@ti.com>2014-11-25 08:47:04 -0600
commit4db9917b641d18d24932ee2ec95b23a1e26c3f7e (patch)
treeefb5b798a3295f21de965fd96fe8c246850131be
parent23fba80a9b1a36654078e29f4df73f07793154fa (diff)
downloadtalos-op-linux-4db9917b641d18d24932ee2ec95b23a1e26c3f7e.tar.gz
talos-op-linux-4db9917b641d18d24932ee2ec95b23a1e26c3f7e.zip
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 = {
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 */
OpenPOWER on IntegriCloud