Re: [PATCH 4/4] Input: ep93xx_keypad - switch to using managed resources

From: Dmitry Torokhov
Date: Tue Oct 12 2021 - 22:34:33 EST


On Tue, Oct 12, 2021 at 09:54:32AM +0200, Alexander Sverdlin wrote:
> Hello Dmitry,
>
> just one question below:
>
> On Mon, 2021-10-11 at 18:37 -0700, Dmitry Torokhov wrote:
> > +               return err;
> > +
> > +       err = devm_add_action_or_reset(&pdev->dev,
> > +                                      ep93xx_keypad_release_gpio_action, pdev);
> > +       if (err)
> > +               return err;
> >  
> >         keypad->clk = clk_get(&pdev->dev, NULL);
>
> Isn't the conversion to devm_clk_get() missing here?

Indeed it is. I'll post an updated patch in a sec.

>
> > -       if (IS_ERR(keypad->clk)) {
> > -               err = PTR_ERR(keypad->clk);
> > -               goto failed_free_gpio;
> > -       }
> > +       if (IS_ERR(keypad->clk))
> > +               return PTR_ERR(keypad->clk);

Thanks.

--
Dmitry