Skip to content

Commit

Permalink
powerpc/fsl_pci: Fix ptr_ret.cocci warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Carmichael561 authored and Scott Wood committed Jan 21, 2018
1 parent bb8651e commit d038386
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/sysdev/fsl_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,10 +1304,8 @@ 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)
Expand Down

0 comments on commit d038386

Please sign in to comment.