diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-02-06 09:56:36 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-15 13:42:41 -0500 |
commit | 424a6c607c169ca0ac8431424f28fc839b45b14c (patch) | |
tree | 292a3a6dcc74f9bf62f81dc5d3afa7fe4a18a649 | |
parent | 41bd0c52c0d3e38202608cfe133faca9a0e53ae8 (diff) |
pinctrl: Fix return value check in amd_gpio_probe()
In case of error, the function devm_ioremap_nocache() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-amd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 657449431301..5c025f5b5048 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c | |||
@@ -753,8 +753,8 @@ static int amd_gpio_probe(struct platform_device *pdev) | |||
753 | 753 | ||
754 | gpio_dev->base = devm_ioremap_nocache(&pdev->dev, res->start, | 754 | gpio_dev->base = devm_ioremap_nocache(&pdev->dev, res->start, |
755 | resource_size(res)); | 755 | resource_size(res)); |
756 | if (IS_ERR(gpio_dev->base)) | 756 | if (!gpio_dev->base) |
757 | return PTR_ERR(gpio_dev->base); | 757 | return -ENOMEM; |
758 | 758 | ||
759 | irq_base = platform_get_irq(pdev, 0); | 759 | irq_base = platform_get_irq(pdev, 0); |
760 | if (irq_base < 0) { | 760 | if (irq_base < 0) { |