* [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO
@ 2018-01-23 20:37 Christopher Díaz Riveros
2018-01-24 3:33 ` Tyrel Datwyler
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-23 20:37 UTC (permalink / raw)
To: benh, paulus, mpe, joe, christian.koenig, tyreld, konrad.wilk, robh
Cc: linuxppc-dev, linux-kernel, kernel-janitors
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
This issue was detected by using the Coccinelle software.
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
---
arch/powerpc/sysdev/fsl_pci.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index cc20d2255d7f..142184635c81 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -1304,10 +1304,7 @@ static int add_err_dev(struct platform_device *pdev)
pdev->resource,
pdev->num_resources,
&pd, sizeof(pd));
- if (IS_ERR(errdev))
- return PTR_ERR(errdev);
-
- return 0;
+ return PTR_ERR_OR_ZERO(errdev);
}
static int fsl_pci_probe(struct platform_device *pdev)
--
2.16.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO
2018-01-23 20:37 [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO Christopher Díaz Riveros
@ 2018-01-24 3:33 ` Tyrel Datwyler
0 siblings, 0 replies; 2+ messages in thread
From: Tyrel Datwyler @ 2018-01-24 3:33 UTC (permalink / raw)
To: Christopher Díaz Riveros, benh, paulus, mpe, joe,
christian.koenig, tyreld, konrad.wilk, robh
Cc: linuxppc-dev, linux-kernel, kernel-janitors
On 01/23/2018 12:37 PM, Christopher Díaz Riveros wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
> ---
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> arch/powerpc/sysdev/fsl_pci.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
> index cc20d2255d7f..142184635c81 100644
> --- a/arch/powerpc/sysdev/fsl_pci.c
> +++ b/arch/powerpc/sysdev/fsl_pci.c
> @@ -1304,10 +1304,7 @@ static int add_err_dev(struct platform_device *pdev)
> pdev->resource,
> pdev->num_resources,
> &pd, sizeof(pd));
> - if (IS_ERR(errdev))
> - return PTR_ERR(errdev);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(errdev);
> }
>
> static int fsl_pci_probe(struct platform_device *pdev)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-24 3:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 20:37 [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO Christopher Díaz Riveros
2018-01-24 3:33 ` Tyrel Datwyler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).