Messages in this thread | | | Date | Wed, 20 Nov 2013 21:13:30 +0200 | From | Stefan Kristiansson <> | Subject | Re: [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
| |