diff mbox

[3.16.y-ckt,stable] Patch "gpio: rcar: Fix error path for devm_kzalloc() failure" has been added to staging queue

Message ID 1425303498-2642-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques March 2, 2015, 1:38 p.m. UTC
This is a note to let you know that I have just added a patch titled

    gpio: rcar: Fix error path for devm_kzalloc() failure

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt8.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From 7458c80e89c6c17ad899f5de762ee3a925cf9f0b Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon, 12 Jan 2015 11:07:58 +0100
Subject: gpio: rcar: Fix error path for devm_kzalloc() failure

commit 7d82bf3419c103dbb730e7834186fc5d577b9da1 upstream.

If the call to devm_kzalloc() fails, nothing must be cleant up.
This was missed before because gpio_rcar_probe() had a "return"
statement after the first "goto err0".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Fixes: df0c6c80232f2ad4 ("gpio: rcar: Add minimal runtime PM support")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/gpio/gpio-rcar.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index b6ae89ea8811..c3ea3e9e3d14 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -363,10 +363,8 @@  static int gpio_rcar_probe(struct platform_device *pdev)
 	int ret;

 	p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);
-	if (!p) {
-		ret = -ENOMEM;
-		goto err0;
-	}
+	if (!p)
+		return -ENOMEM;

 	p->pdev = pdev;
 	spin_lock_init(&p->lock);