diff options
author | Greg Kroah-Hartman | 2018-05-29 17:31:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-05-31 12:54:22 +0200 |
commit | 743d1effe6c1c6b2b42e9e4ca958a4403373702d (patch) | |
tree | 9ed265bfcc56860dad971464f1b91c6f4cde27e9 /drivers/usb | |
parent | edbeb6bc696ec727815bc6b17f7c29f4102d94b6 (diff) |
USB: gadget: udc: renesas_usb3: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/renesas_usb3.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index 5caf78bbbf7c..977ea1a02cf9 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2391,22 +2391,10 @@ static const struct file_operations renesas_usb3_b_device_fops = { static void renesas_usb3_debugfs_init(struct renesas_usb3 *usb3, struct device *dev) { - struct dentry *root, *file; + usb3->dentry = debugfs_create_dir(dev_name(dev), NULL); - root = debugfs_create_dir(dev_name(dev), NULL); - if (IS_ERR_OR_NULL(root)) { - dev_info(dev, "%s: Can't create the root\n", __func__); - return; - } - - file = debugfs_create_file("b_device", 0644, root, usb3, - &renesas_usb3_b_device_fops); - if (!file) { - dev_info(dev, "%s: Can't create debugfs mode\n", __func__); - debugfs_remove_recursive(root); - } else { - usb3->dentry = root; - } + debugfs_create_file("b_device", 0644, usb3->dentry, usb3, + &renesas_usb3_b_device_fops); } /*------- platform_driver ------------------------------------------------*/ |