Skip to contentSkip to conversation

scsi: fcoe: simplify the return expression of fcoe_sysfs_setup

PATCH Applied Qinglang Miao 2 participants 3 messages Sep 21, 2020 – Oct 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fcoe: simplify the return expression of fcoe_sysfs_setup

Simplify the return expression.

---
 drivers/scsi/fcoe/fcoe_sysfs.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/scsi/fcoe/fcoe_sysfs.c +1 -7
index 2cb7a8c93..ffef2c8ed 100644
@@ -1053,16 +1053,10 @@ EXPORT_SYMBOL_GPL(fcoe_fcf_device_add);
 
 int __init fcoe_sysfs_setup(void)
 {
-	int error;
-
 	atomic_set(&ctlr_num, 0);
 	atomic_set(&fcf_num, 0);
 
-	error = bus_register(&fcoe_bus_type);
-	if (error)
-		return error;
-
-	return 0;
+	return bus_register(&fcoe_bus_type);
 }
 
 void __exit fcoe_sysfs_teardown(void)
Signature · 1 line
2.23.0
#1 lore raw

Qinglang,

Quoted 1 line

Simplify the return expression.

Applied to 5.10/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering