2016-12-24 09:38:11

by Rahul Krishnan

[permalink] [raw]
Subject: [PATCH v2] pci: hotplug: This patch removes unnecessary return statement using spatch tool


This patch removes unnecessary return statement using spatch tool

Signed-off-by: Rahul Krishnan <[email protected]>
---
drivers/pci/hotplug/rpadlpar_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index dc67f39..78ce2c7 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -455,7 +455,6 @@ static inline int is_dlpar_capable(void)

int __init rpadlpar_io_init(void)
{
- int rc = 0;

if (!is_dlpar_capable()) {
printk(KERN_WARNING "%s: partition not DLPAR capable\n",
@@ -463,8 +462,7 @@ int __init rpadlpar_io_init(void)
return -EPERM;
}

- rc = dlpar_sysfs_init();
- return rc;
+ return dlpar_sysfs_init();
}

void rpadlpar_io_exit(void)
--
2.7.4


2016-12-27 22:33:26

by Tyrel Datwyler

[permalink] [raw]
Subject: Re: [PATCH v2] pci: hotplug: This patch removes unnecessary return statement using spatch tool

On 12/24/2016 01:38 AM, Rahul Krishnan wrote:
>
> This patch removes unnecessary return statement using spatch tool
>
> Signed-off-by: Rahul Krishnan <[email protected]>

Reviewed-by: Tyrel Datwyler <[email protected]>

> ---
> drivers/pci/hotplug/rpadlpar_core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
> index dc67f39..78ce2c7 100644
> --- a/drivers/pci/hotplug/rpadlpar_core.c
> +++ b/drivers/pci/hotplug/rpadlpar_core.c
> @@ -455,7 +455,6 @@ static inline int is_dlpar_capable(void)
>
> int __init rpadlpar_io_init(void)
> {
> - int rc = 0;
>
> if (!is_dlpar_capable()) {
> printk(KERN_WARNING "%s: partition not DLPAR capable\n",
> @@ -463,8 +462,7 @@ int __init rpadlpar_io_init(void)
> return -EPERM;
> }
>
> - rc = dlpar_sysfs_init();
> - return rc;
> + return dlpar_sysfs_init();
> }
>
> void rpadlpar_io_exit(void)
>