summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2019-06-26 21:30:07 +0800
committerLee Jones <lee.jones@linaro.org>2019-07-02 12:11:31 +0100
commit7efd105c27fd2323789b41b64763a0e33ed79c08 (patch)
tree8e98b2290dbe0db77ad26f2476044e487738997c /drivers/mfd
parentd6871a73387d51dfdde6ad1479aea54d3eafcc89 (diff)
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: Axel Lin <axel.lin@ingics.com> Acked-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/hi655x-pmic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c
index 96c07fa1802a..6693f74aa6ab 100644
--- a/drivers/mfd/hi655x-pmic.c
+++ b/drivers/mfd/hi655x-pmic.c
@@ -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)) {