[PATCH 2/2] pinctrl: th1520: Fix return value for unknown pin error

Markus Elfring Markus.Elfring at web.de
Sat Oct 5 23:09:34 PDT 2024


> Fix th1520_pinctrl_dt_node_to_map() to a return value upon an unknown

                                      to return an error code?


> pin error before jumping to free_configs.

…
> +++ b/drivers/pinctrl/pinctrl-th1520.c
> @@ -499,6 +499,7 @@ static int th1520_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
>  				nmaps = rollback;
>  				dev_err(thp->pctl->dev, "%pOFn.%pOFn: unknown pin '%s'\n",
>  					np, child, pinname);
> +				ret = -EINVAL;
>  				goto free_configs;
>  			}
…

Would you dare to support another jump target for this assignment statement?

Regards,
Markus



More information about the linux-riscv mailing list