Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vasyl Gomonovych and committed by
Scott Wood
d038386a bb8651e5

+1 -3
+1 -3
arch/powerpc/sysdev/fsl_pci.c
··· 1304 1304 pdev->resource, 1305 1305 pdev->num_resources, 1306 1306 &pd, sizeof(pd)); 1307 - if (IS_ERR(errdev)) 1308 - return PTR_ERR(errdev); 1309 1307 1310 - return 0; 1308 + return PTR_ERR_OR_ZERO(errdev); 1311 1309 } 1312 1310 1313 1311 static int fsl_pci_probe(struct platform_device *pdev)