Re: [PATCH] gpio/rockchip: fix refcount leak in rockchip_gpiolib_register()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 5, 2022 at 7:21 AM wangyufen <wangyufen@xxxxxxxxxx> wrote:
>
>
>
> 在 2022/12/5 14:19, Wang Yufen 写道:
> > The node returned by of_get_parent() with refcount incremented,
> > of_node_put() needs be called when finish using it. So add it in the
> > end of of_pinctrl_get().
> >
> > Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio")
> > Signed-off-by: Wang Yufen <wangyufen@xxxxxxxxxx>
> > ---
> >   drivers/gpio/gpio-rockchip.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
> > index 870910b..200e43a 100644
> > --- a/drivers/gpio/gpio-rockchip.c
> > +++ b/drivers/gpio/gpio-rockchip.c
> > @@ -610,6 +610,7 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)
> >                       return -ENODATA;
> >
> >               pctldev = of_pinctrl_get(pctlnp);
> > +             of_node_put(pctlnp);
> >               if (!pctldev)
> >                       return -ENODEV;
> >

Something went wrong when sending the patch? Did you use git send-email?

Bart




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux