提交 9fc6f220 编写于 作者: G Greg Kroah-Hartman

USB: isp116x-hcd: 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: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 63c4c0d8
...@@ -1198,14 +1198,11 @@ static int isp116x_debug_show(struct seq_file *s, void *unused) ...@@ -1198,14 +1198,11 @@ static int isp116x_debug_show(struct seq_file *s, void *unused)
} }
DEFINE_SHOW_ATTRIBUTE(isp116x_debug); DEFINE_SHOW_ATTRIBUTE(isp116x_debug);
static int create_debug_file(struct isp116x *isp116x) static void create_debug_file(struct isp116x *isp116x)
{ {
isp116x->dentry = debugfs_create_file(hcd_name, isp116x->dentry = debugfs_create_file(hcd_name,
S_IRUGO, NULL, isp116x, S_IRUGO, NULL, isp116x,
&isp116x_debug_fops); &isp116x_debug_fops);
if (!isp116x->dentry)
return -ENOMEM;
return 0;
} }
static void remove_debug_file(struct isp116x *isp116x) static void remove_debug_file(struct isp116x *isp116x)
...@@ -1215,8 +1212,8 @@ static void remove_debug_file(struct isp116x *isp116x) ...@@ -1215,8 +1212,8 @@ static void remove_debug_file(struct isp116x *isp116x)
#else #else
#define create_debug_file(d) 0 static inline void create_debug_file(struct isp116x *isp116x) { }
#define remove_debug_file(d) do{}while(0) static inline void remove_debug_file(struct isp116x *isp116x) { }
#endif /* CONFIG_DEBUG_FS */ #endif /* CONFIG_DEBUG_FS */
...@@ -1643,16 +1640,10 @@ static int isp116x_probe(struct platform_device *pdev) ...@@ -1643,16 +1640,10 @@ static int isp116x_probe(struct platform_device *pdev)
device_wakeup_enable(hcd->self.controller); device_wakeup_enable(hcd->self.controller);
ret = create_debug_file(isp116x); create_debug_file(isp116x);
if (ret) {
ERR("Couldn't create debugfs entry\n");
goto err7;
}
return 0; return 0;
err7:
usb_remove_hcd(hcd);
err6: err6:
usb_put_hcd(hcd); usb_put_hcd(hcd);
err5: err5:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册