Skip to content

Commit d038386

Browse files
Carmichael561Scott Wood
authored andcommitted
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>
1 parent bb8651e commit d038386

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎arch/powerpc/sysdev/fsl_pci.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,10 +1304,8 @@ static int add_err_dev(struct platform_device *pdev)
13041304
pdev->resource,
13051305
pdev->num_resources,
13061306
&pd, sizeof(pd));
1307-
if (IS_ERR(errdev))
1308-
return PTR_ERR(errdev);
13091307

1310-
return 0;
1308+
return PTR_ERR_OR_ZERO(errdev);
13111309
}
13121310

13131311
static int fsl_pci_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)