From: Axel Lin Date: Tue, 9 Apr 2013 15:59:58 +0000 (+0800) Subject: pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1f1a73571cb64713641cb75690c4686a4cabc96d;p=openwrt%2Fstaging%2Fblogic.git pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register() pinctrl_register() returns NULL on error. Signed-off-by: Axel Lin Acked-by: Tony Prisk Acked-by: Linus Walleij Signed-off-by: Olof Johansson --- diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index 14400a7974bd..ab63104e8dc9 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; }