Commit 1f1a7357 authored by Axel Lin's avatar Axel Lin Committed by Arnd Bergmann

pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()

pinctrl_register() returns NULL on error.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarTony Prisk <linux@prisktech.co.nz>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 0dc488e7
......@@ -588,7 +588,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev,
data->dev = &pdev->dev;
data->pctl_dev = pinctrl_register(&wmt_desc, &pdev->dev, data);
if (IS_ERR(data->pctl_dev)) {
if (!data->pctl_dev) {
dev_err(&pdev->dev, "Failed to register pinctrl\n");
return -EINVAL;
}
......
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