From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> 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. Fixes: 003910ebc83b ("pinctrl: Introduce TI IOdelay configuration driver") Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> --- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c index 3b86d3d..8899f5e 100644 --- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c +++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c @@ -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; } -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html