diff options
author | Axel Lin <axel.lin@ingics.com> | 2019-06-26 09:30:07 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-07-02 07:11:31 -0400 |
commit | 7efd105c27fd2323789b41b64763a0e33ed79c08 (patch) | |
tree | 8e98b2290dbe0db77ad26f2476044e487738997c | |
parent | d6871a73387d51dfdde6ad1479aea54d3eafcc89 (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>
-rw-r--r-- | drivers/mfd/hi655x-pmic.c | 2 |
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) | |||
112 | 112 | ||
113 | pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base, | 113 | pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base, |
114 | &hi655x_regmap_config); | 114 | &hi655x_regmap_config); |
115 | if (IS_ERR(pmic->regmap)) | ||
116 | return PTR_ERR(pmic->regmap); | ||
115 | 117 | ||
116 | regmap_read(pmic->regmap, HI655X_BUS_ADDR(HI655X_VER_REG), &pmic->ver); | 118 | regmap_read(pmic->regmap, HI655X_BUS_ADDR(HI655X_VER_REG), &pmic->ver); |
117 | if ((pmic->ver < PMU_VER_START) || (pmic->ver > PMU_VER_END)) { | 119 | if ((pmic->ver < PMU_VER_START) || (pmic->ver > PMU_VER_END)) { |