pinctrl_register() returns NULL on error.Not sure why I missed this...
Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
---
drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
index 14400a7..ab63104e 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
@@ -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;
}