mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Acked-by: Chen Feng <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
d6871a7338
commit
7efd105c27
1 changed files with 2 additions and 0 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue