Skip to contentSkip to conversation

USB: chipidea: no need to check return value of debugfs_create functions

PATCH New Greg Kroah-Hartman 1 participant 1 message May 29, 2018

Subsystems (2)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 13/22 USB: chipidea: 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.

---
 drivers/usb/chipidea/ci.h    |  2 +-
 drivers/usb/chipidea/core.c  |  4 +--
 drivers/usb/chipidea/debug.c | 56 ++++++++++--------------------------
 3 files changed, 17 insertions(+), 45 deletions(-)
drivers/usb/chipidea/ci.h +1 -1
index 98b7cb3d0064..0bf244d50544 100644
@@ -450,7 +450,7 @@ void hw_phymode_configure(struct ci_hdrc *ci);
 
 void ci_platform_configure(struct ci_hdrc *ci);
 
-int dbg_create_files(struct ci_hdrc *ci);
+void dbg_create_files(struct ci_hdrc *ci);
 
 void dbg_remove_files(struct ci_hdrc *ci);
 #endif	/* __DRIVERS_USB_CHIPIDEA_CI_H */
drivers/usb/chipidea/core.c +1 -3
index 33ae87fa3ff3..85fc6db48e44 100644
@@ -1062,9 +1062,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
 		ci_hdrc_otg_fsm_start(ci);
 
 	device_set_wakeup_capable(&pdev->dev, true);
-	ret = dbg_create_files(ci);
-	if (ret)
-		goto stop;
+	dbg_create_files(ci);
 
 	ret = sysfs_create_group(&dev->kobj, &ci_attr_group);
 	if (ret)
drivers/usb/chipidea/debug.c +15 -41

69 lines not on this page · raw message