Commit 7efd105c authored by Axel Lin's avatar Axel Lin Committed by Lee Jones

mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk

Since devm_regmap_init_mmio_clk can fail, add return value checking.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarChen Feng <puck.chen@hisilicon.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent d6871a73
......@@ -112,6 +112,8 @@ static int hi655x_pmic_probe(struct platform_device *pdev)
pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base,
&hi655x_regmap_config);
if (IS_ERR(pmic->regmap))
return PTR_ERR(pmic->regmap);
regmap_read(pmic->regmap, HI655X_BUS_ADDR(HI655X_VER_REG), &pmic->ver);
if ((pmic->ver < PMU_VER_START) || (pmic->ver > PMU_VER_END)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment