From: Geliang Tang <geliangtang@163.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Geliang Tang <geliangtang@163.com>, linux-kernel@vger.kernel.org
Subject: [PATCH v2] hsi: fix double kfree
Date: Thu, 1 Oct 2015 22:35:21 +0800 [thread overview]
Message-ID: <1443710121-10251-1-git-send-email-geliangtang@163.com> (raw)
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
next reply other threads:[~2015-10-01 14:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 14:35 Geliang Tang [this message]
2015-10-06 21:34 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443710121-10251-1-git-send-email-geliangtang@163.com \
--to=geliangtang@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®