diff mbox

pinctrl: tegra: return correct error type

Message ID 1391607694-8608-1-git-send-email-ldewangan@nvidia.com
State Not Applicable, archived
Headers show

Commit Message

Laxman Dewangan Feb. 5, 2014, 1:41 p.m. UTC
When memory allocation failed, drive should return error as ENOMEM.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/pinctrl/pinctrl-tegra.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Warren Feb. 5, 2014, 4:05 p.m. UTC | #1
On 02/05/2014 06:41 AM, Laxman Dewangan wrote:
> When memory allocation failed, drive should return error as ENOMEM.

Acked-by: Stephen Warren <swarren@nvidia.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Feb. 6, 2014, 1:22 p.m. UTC | #2
On Wed, Feb 5, 2014 at 2:41 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote:

> When memory allocation failed, drive should return error as ENOMEM.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

Patch applied for fixes with Stephen's ACK.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index a2e93a2..e767355 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -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++) {