diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2024-08-19 05:46:25 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-08-24 17:28:38 +0300 |
commit | cacd8cf79d7823b07619865e994a7916fcc8ae91 (patch) | |
tree | ad9e8e9782ee8c7d095696cc363d46895831c2cb | |
parent | 811e62c80a879d717f7bd4a293eb2c66ed4560ba (diff) | |
download | linux-cacd8cf79d7823b07619865e994a7916fcc8ae91.tar.xz |
pinctrl: single: fix missing error code in pcs_probe()
If pinctrl_enable() fails in pcs_probe(), it should return the error code.
Fixes: 8f773bfbdd42 ("pinctrl: single: fix possible memory leak when pinctrl_enable() fails")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/20240819024625.154441-1-yangyingliang@huaweicloud.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 4c6bfabb6bd7..fcac0c03905c 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1911,7 +1911,8 @@ static int pcs_probe(struct platform_device *pdev) dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size); - if (pinctrl_enable(pcs->pctl)) + ret = pinctrl_enable(pcs->pctl); + if (ret) goto free; return 0; |