linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: archit@ti.com, axel.lin@gmail.com
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Emil Goode <emilgoode@gmail.com>
Subject: [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
Date: Wed, 05 Jun 2013 17:29:56 +0000	[thread overview]
Message-ID: <1370453396-18043-1-git-send-email-emilgoode@gmail.com> (raw)

It's not necessary to free memory allocated with devm_kzalloc
in a remove function and using kfree leads to a double free.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 drivers/video/omap2/displays/panel-picodlp.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-picodlp.c b/drivers/video/omap2/displays/panel-picodlp.c
index 62f2db0..859e111 100644
--- a/drivers/video/omap2/displays/panel-picodlp.c
+++ b/drivers/video/omap2/displays/panel-picodlp.c
@@ -469,8 +469,6 @@ static void picodlp_panel_remove(struct omap_dss_device *dssdev)
 	i2c_unregister_device(picod->picodlp_i2c_client);
 	dev_set_drvdata(&dssdev->dev, NULL);
 	dev_dbg(&dssdev->dev, "removing picodlp panel\n");
-
-	kfree(picod);
 }
 
 static int picodlp_panel_enable(struct omap_dss_device *dssdev)
-- 
1.7.10.4


             reply	other threads:[~2013-06-05 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 17:29 Emil Goode [this message]
2013-06-06  7:22 ` [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc Archit Taneja

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=1370453396-18043-1-git-send-email-emilgoode@gmail.com \
    --to=emilgoode@gmail.com \
    --cc=archit@ti.com \
    --cc=axel.lin@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.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;
as well as URLs for NNTP newsgroup(s).