[PATCH] ARM: i.MX6: ocotp: remove useless code

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 20 04:14:22 PDT 2015


cdev->name is initialized to a static string, so no need
to check if it's non NULL.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-imx/ocotp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c
index b58aafa..c99a003 100644
--- a/arch/arm/mach-imx/ocotp.c
+++ b/arch/arm/mach-imx/ocotp.c
@@ -426,8 +426,6 @@ static int imx_ocotp_probe(struct device_d *dev)
 	cdev->priv	= priv;
 	cdev->size	= 192;
 	cdev->name	= "imx-ocotp";
-	if (cdev->name == NULL)
-		return -ENOMEM;
 
 	ret = devfs_create(cdev);
 
-- 
2.1.4




More information about the barebox mailing list