The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andreas Pretzsch <apr@cn-eng.de>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Axel Lin <axel.lin@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] mfd: Use devm_* APIs for mc13xxx: remove leftover kfree
Date: Mon, 17 Sep 2012 18:17:21 +0200	[thread overview]
Message-ID: <1347898641-17575-1-git-send-email-apr@cn-eng.de> (raw)

commit e7c706b1e5ccf28eaaf76c7a4613e80b0ca52863 migrated the allocation
of struct mc13xxx to devm_* functions, but left a kfree(mc13xxx) in the
mc13xxx_common_init error path. Remove it to prevent memory corruption.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
---
 drivers/mfd/mc13xxx-core.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 1ec79b5..1aba023 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -676,7 +676,6 @@ int mc13xxx_common_init(struct mc13xxx *mc13xxx,
 err_mask:
 err_revision:
 		mc13xxx_unlock(mc13xxx);
-		kfree(mc13xxx);
 		return ret;
 	}
 
-- 
1.7.10.4


             reply	other threads:[~2012-09-17 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 16:17 Andreas Pretzsch [this message]
2012-09-18  0:58 ` [PATCH] mfd: Use devm_* APIs for mc13xxx: remove leftover kfree Axel Lin
2012-09-19 11:28 ` Samuel Ortiz

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=1347898641-17575-1-git-send-email-apr@cn-eng.de \
    --to=apr@cn-eng.de \
    --cc=axel.lin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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