pinctrl: tegra: return correct error type
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 5 Feb 2014 13:41:34 +0000 (19:11 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 6 Feb 2014 13:21:19 +0000 (14:21 +0100)
When memory allocation failed, drive should return error as ENOMEM.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-tegra.c

index a2e93a2b5ff487aa0dad6fc8c9f2d863e6debb07..e767355ab0ad7a02fc5a1ff8cb62ad0cd943f698 100644 (file)
@@ -645,7 +645,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
                                 GFP_KERNEL);
        if (!pmx->regs) {
                dev_err(&pdev->dev, "Can't alloc regs pointer\n");
-               return -ENODEV;
+               return -ENOMEM;
        }
 
        for (i = 0; i < pmx->nbanks; i++) {