linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: Remove kfree call since devm_kzalloc() is used
@ 2014-06-20 21:50 Emil Goode
  2014-06-23 11:11 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Emil Goode @ 2014-06-20 21:50 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
	H Hartley Sweeten
  Cc: linux-fbdev, linux-kernel, kernel-janitors, Emil Goode

We use devm_kzalloc() to allocate memory for the struct vt8500lcd_info
pointer fbi, so there is no need to free it in vt8500lcd_remove().

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

diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index a8f2b28..a1134c3 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -474,8 +474,6 @@ static int vt8500lcd_remove(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	release_mem_region(res->start, resource_size(res));
 
-	kfree(fbi);
-
 	return 0;
 }
 
-- 
1.7.10.4


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

* Re: [PATCH] video: Remove kfree call since devm_kzalloc() is used
  2014-06-20 21:50 [PATCH] video: Remove kfree call since devm_kzalloc() is used Emil Goode
@ 2014-06-23 11:11 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2014-06-23 11:11 UTC (permalink / raw)
  To: Emil Goode, Jean-Christophe Plagniol-Villard, Jingoo Han,
	H Hartley Sweeten
  Cc: linux-fbdev, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

On 21/06/14 00:50, Emil Goode wrote:
> We use devm_kzalloc() to allocate memory for the struct vt8500lcd_info
> pointer fbi, so there is no need to free it in vt8500lcd_remove().
> 
> Signed-off-by: Emil Goode <emilgoode@gmail.com>
> ---
>  drivers/video/fbdev/vt8500lcdfb.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
> index a8f2b28..a1134c3 100644
> --- a/drivers/video/fbdev/vt8500lcdfb.c
> +++ b/drivers/video/fbdev/vt8500lcdfb.c
> @@ -474,8 +474,6 @@ static int vt8500lcd_remove(struct platform_device *pdev)
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	release_mem_region(res->start, resource_size(res));
>  
> -	kfree(fbi);
> -
>  	return 0;
>  }
>  
> 

Thanks, queued for 3.17.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2014-06-23 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 21:50 [PATCH] video: Remove kfree call since devm_kzalloc() is used Emil Goode
2014-06-23 11:11 ` Tomi Valkeinen

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