diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-04-09 11:59:58 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-19 11:16:36 -0400 |
commit | 1f1a73571cb64713641cb75690c4686a4cabc96d (patch) | |
tree | 52f92f9bbe8002c80f3cdeb5661e259b1afa9d3e /drivers/pinctrl/vt8500/pinctrl-wmt.c | |
parent | 0dc488e778069b208d09516c5f0793dc37023c8e (diff) |
pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
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>
Diffstat (limited to 'drivers/pinctrl/vt8500/pinctrl-wmt.c')
-rw-r--r-- | drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
588 | data->dev = &pdev->dev; | 588 | data->dev = &pdev->dev; |
589 | 589 | ||
590 | data->pctl_dev = pinctrl_register(&wmt_desc, &pdev->dev, data); | 590 | data->pctl_dev = pinctrl_register(&wmt_desc, &pdev->dev, data); |
591 | if (IS_ERR(data->pctl_dev)) { | 591 | if (!data->pctl_dev) { |
592 | dev_err(&pdev->dev, "Failed to register pinctrl\n"); | 592 | dev_err(&pdev->dev, "Failed to register pinctrl\n"); |
593 | return -EINVAL; | 593 | return -EINVAL; |
594 | } | 594 | } |