[PATCH] ARM: davinci: dm646x: Make use of PTR_ERR_OR_ZERO

Prasanna Karthik pkarthik at intrinsyc.com
Thu Apr 28 14:22:55 PDT 2016


Using PTR_ERR_OR_ZERO instead of explicit Conditional operation

Signed-off-by: Prasanna Karthik <pkarthik at intrinsyc.com>
---
 arch/arm/mach-davinci/dm646x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index a43db0f..9a5faaf1 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)
 	dm646x_edma_pdata.rsv = rsv;
 
 	edma_pdev = platform_device_register_full(&dm646x_edma_device);
-	return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0;
+	return PTR_ERR_OR_ZERO(edma_pdev);
 }
 
 void __init dm646x_init(void)
-- 
1.9.1



More information about the linux-arm-kernel mailing list