mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
23fba80a9b
commit
4db9917b64
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user