On Tue, 2011-05-10 at 19:08 +0000, [email protected] wrote:
> Hi,
> 
> Tomi Valkeinen [[email protected]]:
> > omapfb_mode_to_timings() had struct fb_info, struct fb_var and struct
> > fb_ops allocated from stack. This caused the stack usage grow quite
> > high.
> >
> > Use kzalloc to allocate the structs instead.
> 
> [...]
> 
> > +       fbi = kzalloc(sizeof(*fbi), GFP_KERNEL);
> > +       var = kzalloc(sizeof(*var), GFP_KERNEL);
> > +       fbops = kzalloc(sizeof(*fbops), GFP_KERNEL);
> > +       fbi->fbops = fbops;
> 
> You should check and prepare for allocation failures.

So I should. Thanks!

 Tomi


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to