Re: [PATCH] pinctrl: sh-pfc: Unlock on error in sh_pfc_func_set_mux()

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

 



On Tue, Aug 27, 2019 at 11:39 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> We need to unlock and enable IRQs before we return on this error path.

Wow, how could we have missed that?!?
Thanks!

> Fixes: 8a0cc47ccc7c ("pinctrl: sh-pfc: Rollback to mux if required when the gpio is freed")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Linus: As we're already past rc6, I don't plan to send another pull
       request for v5.4.
       Hence can you please take this one directly?
       Thanks!

> --- a/drivers/pinctrl/sh-pfc/pinctrl.c
> +++ b/drivers/pinctrl/sh-pfc/pinctrl.c
> @@ -361,8 +361,10 @@ static int sh_pfc_func_set_mux(struct pinctrl_dev *pctldev, unsigned selector,
>                  * This driver cannot manage both gpio and mux when the gpio
>                  * pin is already enabled. So, this function fails.
>                  */
> -               if (cfg->gpio_enabled)
> -                       return -EBUSY;
> +               if (cfg->gpio_enabled) {
> +                       ret = -EBUSY;
> +                       goto done;
> +               }
>
>                 ret = sh_pfc_config_mux(pfc, grp->mux[i], PINMUX_TYPE_FUNCTION);
>                 if (ret < 0)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux