Skip to content

Commit cacd8cf

Browse files
Yang Yinglianglinusw
authored andcommitted
pinctrl: single: fix missing error code in pcs_probe()
If pinctrl_enable() fails in pcs_probe(), it should return the error code. Fixes: 8f773bf ("pinctrl: single: fix possible memory leak when pinctrl_enable() fails") Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 811e62c commit cacd8cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pinctrl/pinctrl-single.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,8 @@ static int pcs_probe(struct platform_device *pdev)
19111911

19121912
dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size);
19131913

1914-
if (pinctrl_enable(pcs->pctl))
1914+
ret = pinctrl_enable(pcs->pctl);
1915+
if (ret)
19151916
goto free;
19161917

19171918
return 0;

0 commit comments

Comments
 (0)