linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c
@ 2014-05-29  4:57 Sachin Kamat
  2014-05-29  4:57 ` [PATCH 2/5] ARM: imx: Use PTR_ERR_OR_ZERO in mach-mx31moboard.c Sachin Kamat
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Sachin Kamat @ 2014-05-29  4:57 UTC (permalink / raw)
  To: linux-arm-kernel

PTR_ERR_OR_ZERO simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-imx/devices/platform-mxc_rnga.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
index c58404badb59..33d58ca2001a 100644
--- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
@@ -6,6 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
+#include <linux/err.h>
 #include "../hardware.h"
 #include "devices-common.h"
 
@@ -48,9 +49,6 @@ static int __init imxXX_add_mxc_rnga(void)
 #endif /* if defined(CONFIG_SOC_IMX31) */
 		ret = ERR_PTR(-ENODEV);
 
-	if (IS_ERR(ret))
-		return PTR_ERR(ret);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(ret);
 }
 arch_initcall(imxXX_add_mxc_rnga);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-02 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29  4:57 [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Sachin Kamat
2014-05-29  4:57 ` [PATCH 2/5] ARM: imx: Use PTR_ERR_OR_ZERO in mach-mx31moboard.c Sachin Kamat
2014-05-29  4:57 ` [PATCH 3/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-devboard.c Sachin Kamat
2014-05-29  4:57 ` [PATCH 4/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-marxbot.c Sachin Kamat
2014-05-29  4:57 ` [PATCH 5/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-smartbot.c Sachin Kamat
2014-05-29  8:03 ` [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Shawn Guo
2014-05-29  8:06   ` Sachin Kamat
2014-06-02 17:18   ` Philippe Rétornaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).