Skip to content

Commit 0e37704

Browse files
AxelLingregkh
authored andcommitted
mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk
[ Upstream commit 7efd105 ] Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin <[email protected]> Acked-by: Chen Feng <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent bd51cf6 commit 0e37704

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/mfd/hi655x-pmic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ static int hi655x_pmic_probe(struct platform_device *pdev)
112112

113113
pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base,
114114
&hi655x_regmap_config);
115+
if (IS_ERR(pmic->regmap))
116+
return PTR_ERR(pmic->regmap);
115117

116118
regmap_read(pmic->regmap, HI655X_BUS_ADDR(HI655X_VER_REG), &pmic->ver);
117119
if ((pmic->ver < PMU_VER_START) || (pmic->ver > PMU_VER_END)) {

0 commit comments

Comments
 (0)