Commit 47386ce3 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Linus Walleij

pinctrl: ti: fix error return code of ti_iodelay_probe()

When ti_iodelay_pinconf_init_dev() fails, no error return code of
ti_iodelay_probe() is assigned.
To fix this bug, ret is assigned with the return value of
ti_iodelay_pinconf_init_dev(), and then ret is checked.
Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20210306125122.15043-1-baijiaju1990@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent be786ac5
......@@ -867,7 +867,8 @@ static int ti_iodelay_probe(struct platform_device *pdev)
goto exit_out;
}
if (ti_iodelay_pinconf_init_dev(iod))
ret = ti_iodelay_pinconf_init_dev(iod);
if (ret)
goto exit_out;
ret = ti_iodelay_alloc_pins(dev, iod, res->start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment