pinctrl: ti-iodelay: Fix return value check in ti_iodelay_probe()
Subsystems (2)
PATCH 1/1 pinctrl: ti-iodelay: Fix return value check in ti_iodelay_probe()
From: Wei Yongjun <[email protected]>
In case of error, the function pinctrl_register() returns NULL not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test.
--- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/ti/pinctrl-ti-iodelay.c +2 -2
@@ -892,9 +892,9 @@ static int ti_iodelay_probe(struct platform_device *pdev) iod->desc.owner =THIS_MODULE ; iod->pctl =pinctrl_register (&iod->desc, dev, iod); -if (!iod->pctl) { +if (IS_ERR (iod->pctl)) {dev_err (dev,"Failed to register pinctrl\n" ); - ret = -ENODEV ; + ret =PTR_ERR (iod->pctl); goto exit_out; }
Quoted 8 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
pinctrl_register()returns NULL notERR_PTR(). TheIS_ERR()test in the return value check should be replaced with NULL test.Fixes 003910ebc83b ("pinctrl: Introduce TI IOdelay configuration driver")Signed-off-by Wei Yongjun <[email protected]>
Quoted 20 lines
--- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pinctrl/ti/pinctrl-ti-iodelay.c +2
-2@@ -892,9 +892,9 @@ static int ti_iodelay_probe(struct platform_device *pdev) iod->desc.owner =THIS_MODULE ; iod->pctl =pinctrl_register (&iod->desc, dev, iod); -if (!iod->pctl) { +if (IS_ERR (iod->pctl)) {dev_err (dev,"Failed to register pinctrl\n" ); - ret = -ENODEV ; + ret =PTR_ERR (iod->pctl); goto exit_out; }
Quoted 8 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
pinctrl_register()returns NULL notERR_PTR(). TheIS_ERR()test in the return value check should be replaced with NULL test.Fixes 003910ebc83b ("pinctrl: Introduce TI IOdelay configuration driver")Signed-off-by Wei Yongjun <[email protected]>
This does not apply on the devel branch of the pin control tree. Please rebase it and resend. Include Tony's ACK.
Yours,
Linus Walleij