Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+4 -13
+4 -13
drivers/usb/host/isp116x-hcd.c
··· 1198 1198 } 1199 1199 DEFINE_SHOW_ATTRIBUTE(isp116x_debug); 1200 1200 1201 - static int create_debug_file(struct isp116x *isp116x) 1201 + static void create_debug_file(struct isp116x *isp116x) 1202 1202 { 1203 1203 isp116x->dentry = debugfs_create_file(hcd_name, 1204 1204 S_IRUGO, NULL, isp116x, 1205 1205 &isp116x_debug_fops); 1206 - if (!isp116x->dentry) 1207 - return -ENOMEM; 1208 - return 0; 1209 1206 } 1210 1207 1211 1208 static void remove_debug_file(struct isp116x *isp116x) ··· 1212 1215 1213 1216 #else 1214 1217 1215 - #define create_debug_file(d) 0 1216 - #define remove_debug_file(d) do{}while(0) 1218 + static inline void create_debug_file(struct isp116x *isp116x) { } 1219 + static inline void remove_debug_file(struct isp116x *isp116x) { } 1217 1220 1218 1221 #endif /* CONFIG_DEBUG_FS */ 1219 1222 ··· 1640 1643 1641 1644 device_wakeup_enable(hcd->self.controller); 1642 1645 1643 - ret = create_debug_file(isp116x); 1644 - if (ret) { 1645 - ERR("Couldn't create debugfs entry\n"); 1646 - goto err7; 1647 - } 1646 + create_debug_file(isp116x); 1648 1647 1649 1648 return 0; 1650 1649 1651 - err7: 1652 - usb_remove_hcd(hcd); 1653 1650 err6: 1654 1651 usb_put_hcd(hcd); 1655 1652 err5: