All of lore.kernel.org
 help / color / mirror / Atom feed
From: gang.chen@asianux.com (Chen Gang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM:common: setting saved_state to NULL after kfree
Date: Tue, 29 Jan 2013 19:11:43 +0800	[thread overview]
Message-ID: <5107AE6F.3080206@asianux.com> (raw)


  need set NULL before return, just like function sa1111_remove has done.
  and better to use sa1111_remove directly, instead of current implementation.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arm/common/sa1111.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index e57d7e5..4bb8230 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -954,9 +954,7 @@ static int sa1111_resume(struct platform_device *dev)
 	 */
 	id = sa1111_readl(sachip->base + SA1111_SKID);
 	if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
-		__sa1111_remove(sachip);
-		platform_set_drvdata(dev, NULL);
-		kfree(save);
+		sa1111_remove(dev);
 		return 0;
 	}
 
-- 
1.7.10.4

             reply	other threads:[~2013-01-29 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 11:11 Chen Gang [this message]
2013-01-29 11:15 ` [PATCH] ARM:common: setting saved_state to NULL after kfree Russell King - ARM Linux
2013-01-29 11:34   ` Chen Gang
2013-01-29 13:08     ` Chen Gang

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=5107AE6F.3080206@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=linux-arm-kernel@lists.infradead.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.