Skip to contentSkip to conversation

pci: hotplug: This patch removes unnecessary return statement using spatch tool

PATCH Superseded Rahul Krishnan 2 participants 2 messages Dec 24, 2016

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: hotplug: This patch removes unnecessary return statement using spatch tool

This patch removes unnecessary return statement using spatch tool

---
 drivers/pci/hotplug/rpadlpar_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/hotplug/rpadlpar_core.c +1 -2
index dc67f39..9d0e2e1 100644
@@ -463,8 +463,7 @@ int __init rpadlpar_io_init(void)
 		return -EPERM;
 	}
 
-	rc = dlpar_sysfs_init();
-	return rc;
+	return dlpar_sysfs_init();
 }
 
 void rpadlpar_io_exit(void)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 1 line · Rahul Krishnan

This patch removes unnecessary return statement using spatch tool

[]

drivers/pci/hotplug/rpadlpar_core.c

Quoted 1 line
drivers/pci/hotplug/rpadlpar_core.c +0 -0

[]

drivers/pci/hotplug/rpadlpar_core.c int __init rpadlpar_io_init(void) · line 469

Quoted 10 lines
drivers/pci/hotplug/rpadlpar_core.c +1 -2
@@ -463,8 +463,7 @@ int __init rpadlpar_io_init(void)
 		return -EPERM;
 	}
 
-	rc = dlpar_sysfs_init();
-	return rc;
+	return dlpar_sysfs_init();
 }
 
 void rpadlpar_io_exit(void)

If you are going to submit these types of patches, please make sure you compile test them before sending so that you can look at new warnings.

Now rc is unused and its declaration should be removed.