Re: [PATCH RESEND] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk
From: Lee Jones
Date: Thu Jun 27 2019 - 09:47:54 EST
On Thu, 27 Jun 2019, Axel Lin wrote:
> Hi Chen,
>
> Chen Feng <puck.chen@xxxxxxxxxxxxx> æ 2019å6æ27æ éå äå10:03åéï
> >
> > Thanks
> I assume this is an Ack.
> If you can add your Acked-by in the reply, it's easier for maintainer to accept
> the patch.
Looks to me like he already Acked it.
Which is looks like you already applied?
> > On 2019/6/26 21:30, Axel Lin wrote:
> > > Since devm_regmap_init_mmio_clk can fail, add return value checking.
> > >
> > > Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> > > Acked-by: Chen Feng <puck.chen@xxxxxxxxxxxxx>
> > > ---
> > > This was sent on https://lkml.org/lkml/2019/3/6/904
> > >
> > > 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)) {
> > >
> >
--
Lee Jones [æçæ]
Linaro Services Technical Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog