浏览代码

pinctrl: tegra: return correct error type

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>
Laxman Dewangan 11 年之前
父节点
当前提交
5b232c5add
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/pinctrl/pinctrl-tegra.c

+ 1 - 1
drivers/pinctrl/pinctrl-tegra.c

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