All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
@ 2013-06-05 17:29 ` Emil Goode
  0 siblings, 0 replies; 5+ messages in thread
From: Emil Goode @ 2013-06-05 17:29 UTC (permalink / raw)
  To: archit, axel.lin
  Cc: linux-omap, linux-fbdev, linux-kernel, kernel-janitors, Emil Goode

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
@ 2013-06-05 17:29 ` Emil Goode
  0 siblings, 0 replies; 5+ messages in thread
From: Emil Goode @ 2013-06-05 17:29 UTC (permalink / raw)
  To: archit, axel.lin
  Cc: linux-omap, linux-fbdev, linux-kernel, kernel-janitors, Emil Goode

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
  2013-06-05 17:29 ` Emil Goode
  (?)
@ 2013-06-06  7:10   ` Archit Taneja
  -1 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2013-06-06  7:10 UTC (permalink / raw)
  To: Emil Goode
  Cc: axel.lin, linux-omap, linux-fbdev, linux-kernel, kernel-janitors,
	Valkeinen, Tomi

Hi,

On Wednesday 05 June 2013 10:59 PM, Emil Goode wrote:
> It's not necessary to free memory allocated with devm_kzalloc
> in a remove function and using kfree leads to a double free.

Looks fine to me. Tomi, could you take this for 3.11?

Archit

>
> 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)
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
@ 2013-06-06  7:10   ` Archit Taneja
  0 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2013-06-06  7:10 UTC (permalink / raw)
  To: Emil Goode
  Cc: axel.lin, linux-omap, linux-fbdev, linux-kernel, kernel-janitors,
	Valkeinen, Tomi

Hi,

On Wednesday 05 June 2013 10:59 PM, Emil Goode wrote:
> It's not necessary to free memory allocated with devm_kzalloc
> in a remove function and using kfree leads to a double free.

Looks fine to me. Tomi, could you take this for 3.11?

Archit

>
> 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)
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
@ 2013-06-06  7:10   ` Archit Taneja
  0 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2013-06-06  7:22 UTC (permalink / raw)
  To: Emil Goode
  Cc: axel.lin, linux-omap, linux-fbdev, linux-kernel, kernel-janitors,
	Valkeinen, Tomi

Hi,

On Wednesday 05 June 2013 10:59 PM, Emil Goode wrote:
> It's not necessary to free memory allocated with devm_kzalloc
> in a remove function and using kfree leads to a double free.

Looks fine to me. Tomi, could you take this for 3.11?

Archit

>
> 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)
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-06  7:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05 17:29 [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc Emil Goode
2013-06-05 17:29 ` Emil Goode
2013-06-06  7:10 ` Archit Taneja
2013-06-06  7:22   ` Archit Taneja
2013-06-06  7:10   ` Archit Taneja

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.