aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasyl Gomonovych <gomonovych@gmail.com>2017-11-27 18:03:33 -0500
committerSekhar Nori <nsekhar@ti.com>2017-12-23 05:16:25 -0500
commita8bc4f0a5d4e2c0214b230e68b892cd72cdea27b (patch)
tree84648e7bc8f52f77a3491f9767b9a67fd06251a5
parentab41910dfd5ab8e90b6a93d8c17f39ce2dbb069d (diff)
ARM: davinci: Use PTR_ERR_OR_ZERO()
Fix ptr_ret.cocci warnings: arch/arm/mach-davinci/devices-da8xx.c:255:8-14: WARNING: PTR_ERR_OR_ZERO can be used arch/arm/mach-davinci/devices-da8xx.c:300:8-14: WARNING: PTR_ERR_OR_ZERO can be used arch/arm/mach-davinci/dm646x.c:952:8-14: 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: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c4
-rw-r--r--arch/arm/mach-davinci/dm646x.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 22440c05d66a..e1c40e73d30a 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -252,7 +252,7 @@ int __init da830_register_edma(struct edma_rsv_info *rsv)
252 da8xx_edma0_pdata.slavecnt = ARRAY_SIZE(da830_edma_map); 252 da8xx_edma0_pdata.slavecnt = ARRAY_SIZE(da830_edma_map);
253 253
254 edma_pdev = platform_device_register_full(&da8xx_edma0_device); 254 edma_pdev = platform_device_register_full(&da8xx_edma0_device);
255 return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0; 255 return PTR_ERR_OR_ZERO(edma_pdev);
256} 256}
257 257
258static const struct dma_slave_map da850_edma0_map[] = { 258static const struct dma_slave_map da850_edma0_map[] = {
@@ -297,7 +297,7 @@ int __init da850_register_edma(struct edma_rsv_info *rsv[2])
297 da850_edma1_pdata.slavecnt = ARRAY_SIZE(da850_edma1_map); 297 da850_edma1_pdata.slavecnt = ARRAY_SIZE(da850_edma1_map);
298 298
299 edma_pdev = platform_device_register_full(&da850_edma1_device); 299 edma_pdev = platform_device_register_full(&da850_edma1_device);
300 return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0; 300 return PTR_ERR_OR_ZERO(edma_pdev);
301} 301}
302 302
303static struct resource da8xx_i2c_resources0[] = { 303static struct resource da8xx_i2c_resources0[] = {
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index b72e04ad81ce..6fc06a6ad4f8 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -949,7 +949,7 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv)
949 dm646x_edma_pdata.rsv = rsv; 949 dm646x_edma_pdata.rsv = rsv;
950 950
951 edma_pdev = platform_device_register_full(&dm646x_edma_device); 951 edma_pdev = platform_device_register_full(&dm646x_edma_device);
952 return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0; 952 return PTR_ERR_OR_ZERO(edma_pdev);
953} 953}
954 954
955void __init dm646x_init(void) 955void __init dm646x_init(void)