Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c312c2c3 authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Walleij
Browse files

pinctrl: artpec6: Fix return value check in artpec6_pmx_probe()



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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarJesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a5bf5fc0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -937,9 +937,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);