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

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
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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 */