Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 888d0b49 authored by Yang Yingliang's avatar Yang Yingliang Committed by Greg Kroah-Hartman
Browse files

pinctrl: single: fix missing error code in pcs_probe()



[ Upstream commit cacd8cf79d7823b07619865e994a7916fcc8ae91 ]

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: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/20240819024625.154441-1-yangyingliang@huaweicloud.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 29b3bbd9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1898,7 +1898,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;