summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-12-07 14:03:00 +0800
committerLee Jones <lee.jones@linaro.org>2014-01-21 08:28:03 +0000
commitec9e4ba67e3782d5a9ec12754223a3f611810a93 (patch)
tree160e7a2be128bf844878a1ebc12a9ae87886de8e /drivers/mfd
parent328fe79cac65331cbf22c8eefcb2a1f9164974ac (diff)
downloadlinux-ec9e4ba67e3782d5a9ec12754223a3f611810a93.tar.bz2
mfd: sta2x11-mfd: Fix return value check in sta2x11_mfd_platform_probe()
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> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/sta2x11-mfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c
index 53ab686c984f..0d42e40adb98 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;
}