From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Tejun Heo <tj@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
linux-ide@vger.kernel.org, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] pata_octeon_cf: fix ata_host_activate() failure handling
Date: Mon, 31 Mar 2014 19:53:56 +0200 [thread overview]
Message-ID: <5439252.0G82yiBcdS@amdc1032> (raw)
Add missing kfree() call to ata_host_activate() failure path.
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
drivers/ata/pata_octeon_cf.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: b/drivers/ata/pata_octeon_cf.c
===================================================================
--- a/drivers/ata/pata_octeon_cf.c 2014-03-14 16:45:04.320724377 +0100
+++ b/drivers/ata/pata_octeon_cf.c 2014-03-31 18:58:44.367604046 +0200
@@ -1020,13 +1020,16 @@ static int octeon_cf_probe(struct platfo
ata_port_desc(ap, "cmd %p ctl %p", base, ap->ioaddr.ctl_addr);
-
dev_info(&pdev->dev, "version " DRV_VERSION" %d bit%s.\n",
is_16bit ? 16 : 8,
cf_port->is_true_ide ? ", True IDE" : "");
- return ata_host_activate(host, irq, irq_handler,
- IRQF_SHARED, &octeon_cf_sht);
+ rv = ata_host_activate(host, irq, irq_handler,
+ IRQF_SHARED, &octeon_cf_sht);
+ if (rv)
+ goto free_cf_port;
+
+ return 0;
free_cf_port:
kfree(cf_port);
next reply other threads:[~2014-03-31 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 17:53 Bartlomiej Zolnierkiewicz [this message]
2014-03-31 18:14 ` [PATCH] pata_octeon_cf: fix ata_host_activate() failure handling David Daney
2014-03-31 21:26 ` Guenter Roeck
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=5439252.0G82yiBcdS@amdc1032 \
--to=b.zolnierkie@samsung.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.