From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> In case of error, the function pinctrl_register() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> --- v1 -> v2: fix comment --- drivers/pinctrl/pinctrl-artpec6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-artpec6.c b/drivers/pinctrl/pinctrl-artpec6.c index b5a2eff..6a16019 100644 --- a/drivers/pinctrl/pinctrl-artpec6.c +++ b/drivers/pinctrl/pinctrl-artpec6.c @@ -938,9 +938,9 @@ static int artpec6_pmx_probe(struct platform_device *pdev) pmx->num_pin_groups = ARRAY_SIZE(artpec6_pin_groups); pmx->pctl = pinctrl_register(&artpec6_desc, &pdev->dev, pmx); - if (!pmx->pctl) { + if (IS_ERR(pmx->pctl)) { dev_err(&pdev->dev, "could not register pinctrl driver\n"); - return -EINVAL; + return PTR_ERR(pmx->pctl); } platform_set_drvdata(pdev, pmx); -- 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