mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
pinctrl: at91: Add error handling for pinctrl_utils_add_map_mux()
In atmel_pctl_dt_subnode_to_map(), the return value of pinctrl_utils_add_map_mux() needs to be checked, for the function will fail to associate group when the group map is full. Add error handling for pinctrl_utils_add_map_mux() to return immediately and propagate the error code to caller function when the function fails. Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/20250318030717.781-1-vulab@iscas.ac.cn Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
0af2f6be1b
commit
a63cafe241
1 changed files with 3 additions and 1 deletions
|
@ -609,8 +609,10 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
|
|||
if (ret)
|
||||
goto exit;
|
||||
|
||||
pinctrl_utils_add_map_mux(pctldev, map, reserved_maps, num_maps,
|
||||
ret = pinctrl_utils_add_map_mux(pctldev, map, reserved_maps, num_maps,
|
||||
group, func);
|
||||
if (ret)
|
||||
goto exit;
|
||||
|
||||
if (num_configs) {
|
||||
ret = pinctrl_utils_add_map_configs(pctldev, map,
|
||||
|
|
Loading…
Add table
Reference in a new issue