* [PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe()
@ 2013-12-07 6:03 Wei Yongjun
2013-12-09 10:19 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-12-07 6:03 UTC (permalink / raw)
To: sameo, lee.jones; +Cc: yongjun_wei, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe()
2013-12-07 6:03 [PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe() Wei Yongjun
@ 2013-12-09 10:19 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2013-12-09 10:19 UTC (permalink / raw)
To: Wei Yongjun; +Cc: sameo, yongjun_wei, linux-kernel
On Sat, 07 Dec 2013, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.com.cn>
> ---
> drivers/mfd/sta2x11-mfd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-09 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07 6:03 [PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe() Wei Yongjun
2013-12-09 10:19 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox