summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/nomadik
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-08-04 07:49:47 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-08-14 16:01:59 +0300
commit376c7a756908abb2ab2bf8cc88be790f337780fe (patch)
tree0395e200711746e3b4b9be3a1b0f9eaa63d9ad93 /drivers/pinctrl/nomadik
parentd52e0d0ad7a9109116e9e3b926f7a2661bf24eef (diff)
downloadlinux-376c7a756908abb2ab2bf8cc88be790f337780fe.tar.xz
pinctrl: nomadik: fix incorrect type in return expression
Sparse reports "warning: incorrect type in return expression (different address spaces)" because nmk_gpio_populate_chip() is supposed to return (struct nmk_gpio_chip *) whereas devm_ioremap_resource() returns (void __iomem *). ERR_CAST() is needed to fix the warning. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nomadik')
-rw-r--r--drivers/pinctrl/nomadik/pinctrl-nomadik.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index d318ca055489..a53f1a9b1ed2 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -1078,7 +1078,7 @@ static struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np,
res = platform_get_resource(gpio_pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
- return base;
+ return ERR_CAST(base);
nmk_chip->addr = base;
clk = clk_get(&gpio_pdev->dev, NULL);