[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5C80776F.4070806@hisilicon.com>
Date: Thu, 7 Mar 2019 09:44:15 +0800
From: Chen Feng <puck.chen@...ilicon.com>
To: Axel Lin <axel.lin@...ics.com>, Lee Jones <lee.jones@...aro.org>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mfd: hi655x-pmic: Fix missing return value check for
devm_regmap_init_mmio_clk
Thanks
On 2019/3/6 21:49, Axel Lin wrote:
> Since devm_regmap_init_mmio_clk can fail, add return value checking.
>
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
> drivers/mfd/hi655x-pmic.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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)) {
>
--
Cheers,
- Feng
Powered by blists - more mailing lists