Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec9e4ba6 authored by Wei Yongjun's avatar Wei Yongjun Committed by Lee Jones
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 328fe79c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}