Skip to content

Commit

Permalink
usb: gadget: udc: pxa25x: remove unnecessary NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi committed Nov 25, 2014
1 parent 23fba80 commit 4db9917
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/usb/gadget/udc/pxa25x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 4db9917

Please sign in to comment.