powerpc/fsl_pci: Fix ptr_ret.cocci warnings
arch/powerpc/sysdev/fsl_pci.c:1307:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Signed-off-by: Scott Wood <oss@buserror.net>
This commit is contained in:
parent
bb8651e5ce
commit
d038386a0c
1 changed files with 1 additions and 3 deletions
|
@ -1304,10 +1304,8 @@ static int add_err_dev(struct platform_device *pdev)
|
||||||
pdev->resource,
|
pdev->resource,
|
||||||
pdev->num_resources,
|
pdev->num_resources,
|
||||||
&pd, sizeof(pd));
|
&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)
|
static int fsl_pci_probe(struct platform_device *pdev)
|
||||||
|
|
Loading…
Reference in a new issue