pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
authorAxel Lin <axel.lin@ingics.com>
Tue, 9 Apr 2013 15:59:58 +0000 (23:59 +0800)
committerArnd Bergmann <arnd@arndb.de>
Fri, 19 Apr 2013 15:16:36 +0000 (17:16 +0200)
pinctrl_register() returns NULL on error.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
drivers/pinctrl/vt8500/pinctrl-wmt.c

index 14400a7974bd61a47f60b542cda7b0dc51646d03..ab63104e8dc98eb148378b859b6217c93170c304 100644 (file)
@@ -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;
        }