[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd88PwtNx0mjdzGe1K+uFafpxQwZhfDiJNfXPcBCKFA1Bg@mail.gmail.com>
Date: Sat, 7 Dec 2013 14:03:00 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: sameo@...ux.intel.com, lee.jones@...aro.org
Cc: yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org
Subject: [PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
In case of error, the function devm_regmap_init_mmio() returns
ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
drivers/mfd/sta2x11-mfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c
index 53ab686..0d42e40 100644
--- a/drivers/mfd/sta2x11-mfd.c
+++ b/drivers/mfd/sta2x11-mfd.c
@@ -339,7 +339,7 @@ static int sta2x11_mfd_platform_probe(struct platform_device *dev,
regmap_config->cache_type = REGCACHE_NONE;
mfd->regmap[index] = devm_regmap_init_mmio(&dev->dev, mfd->regs[index],
regmap_config);
- WARN_ON(!mfd->regmap[index]);
+ WARN_ON(IS_ERR(mfd->regmap[index]));
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists