Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: th1520: Fix return value for unknown pin error

Fix th1520_pinctrl_dt_node_to_map() to set the return value before
jumping to free_configs when an unknown pin error occurs.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202410022336.xyWlV0Tf-lkp@intel.com/
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241008-th1520-pinctrl-fixes-v3-1-5b60db446a49@tenstorrent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Drew Fustini and committed by
Linus Walleij
7027e36f 26948688

+1
+1
drivers/pinctrl/pinctrl-th1520.c
··· 499 499 nmaps = rollback; 500 500 dev_err(thp->pctl->dev, "%pOFn.%pOFn: unknown pin '%s'\n", 501 501 np, child, pinname); 502 + ret = -EINVAL; 502 503 goto free_configs; 503 504 } 504 505