Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282085 > unrolled thread

[PATCH 3.19.y-ckt 133/164] hsi: fix double kfree

Started byKamal Mostafa <kamal@canonical.com>
First post2015-12-02 18:20 +0100
Last post2015-12-02 18:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.19.y-ckt 133/164] hsi: fix double kfree Kamal Mostafa <kamal@canonical.com> - 2015-12-02 18:20 +0100

#1282085 — [PATCH 3.19.y-ckt 133/164] hsi: fix double kfree

FromKamal Mostafa <kamal@canonical.com>
Date2015-12-02 18:20 +0100
Subject[PATCH 3.19.y-ckt 133/164] hsi: fix double kfree
Message-ID<qBjes-1JE-63@gated-at.bofh.it>
3.19.8-ckt11 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geliang Tang <geliangtang@163.com>

commit f098a045350ecd6045f2f2d5a50fecf2a98962d7 upstream.

When device_register() fails, kfree() is called in hsi_client_release(),
hence there is no need to call kfree in err3 again.

Fixes: a2aa24734d9db ("HSI: Add common DT binding for HSI client devices")
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/hsi/hsi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
index fe93712..35d631e 100644
--- a/drivers/hsi/hsi.c
+++ b/drivers/hsi/hsi.c
@@ -300,7 +300,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port,
 	if (device_register(&cl->device) < 0) {
 		pr_err("hsi: failed to register client: %s\n", name);
 		put_device(&cl->device);
-		goto err3;
 	}
 
 	return;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web