* [PATCH v2] hsi: fix double kfree
@ 2015-10-01 14:35 Geliang Tang
2015-10-06 21:34 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2015-10-01 14:35 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: Geliang Tang, linux-kernel
When device_register() fails, kfree() is called in hsi_client_release(),
hence there is no need to call kfree in err3 again.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
Changes in v2:
- Just to make myself clearer that what I did in this patch.
---
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;
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] hsi: fix double kfree
2015-10-01 14:35 [PATCH v2] hsi: fix double kfree Geliang Tang
@ 2015-10-06 21:34 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2015-10-06 21:34 UTC (permalink / raw)
To: Geliang Tang; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
Hi,
On Thu, Oct 01, 2015 at 10:35:21PM +0800, Geliang Tang wrote:
> When device_register() fails, kfree() is called in hsi_client_release(),
> hence there is no need to call kfree in err3 again.
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-06 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 14:35 [PATCH v2] hsi: fix double kfree Geliang Tang
2015-10-06 21:34 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox