lkml.org 
[lkml]   [2013]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] video: add OpenCores VGA/LCD framebuffer driver
On Wed, Nov 20, 2013 at 03:20:28PM +0900, Jingoo Han wrote:
> On Wednesday, November 20, 2013 1:14 PM, Stefan Kristiansson wrote:
>
> > +static int ocfb_probe(struct platform_device *pdev)
> > +{
> > + int ret = 0;
> > + struct ocfb_dev *fbdev;
> > + struct ocfb_par *par = &ocfb_par_priv;
> > + struct resource *res;
> > + struct resource *mmio;
> > + int fbsize;
> > +
> > + fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
>
> Please use devm_kzalloc() instead of kzalloc().
> In this case, kfree() can be removed from ocfb_probe()
> and ocfb_remove(). Thus, it will make the code smaller.
>

Nice, thanks for the hint!
Consider it done.

> [.....]
>
> > +
> > +#ifdef MODULE
>
> I don't think that '#ifdef MODULE' is necessary.
> Is there any reason?
>

You're right, that's not necessary, I'll remove that.

Thanks alot for taking the time to review it!

Stefan


\
 
 \ /
  Last update: 2013-11-20 20:41    [W:0.036 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site