diff options
author | Axel Lin <axel.lin@ingics.com> | 2019-06-26 21:30:07 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-31 07:27:03 +0200 |
commit | b4e77006d5a77c13f84ea07767bf7790db0cd033 (patch) | |
tree | 79181ee399d77013cfb0118b876aee4709114fb7 /drivers/mfd | |
parent | 9b1691c3f6602c8e26e99433a1511570b2e6e80c (diff) | |
download | linux-stable-b4e77006d5a77c13f84ea07767bf7790db0cd033.tar.gz linux-stable-b4e77006d5a77c13f84ea07767bf7790db0cd033.tar.bz2 linux-stable-b4e77006d5a77c13f84ea07767bf7790db0cd033.zip |
mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk
[ Upstream commit 7efd105c27fd2323789b41b64763a0e33ed79c08 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mfd')
-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) 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)) { |