[PATCH] check kmalloc return value in mtd/sm_rtl.c

Artem Bityutskiy dedekind1 at gmail.com
Fri Mar 11 03:44:05 EST 2011


On Thu, 2011-03-10 at 22:31 +0800, Xiaochen Wang wrote:
> Hi, Artem
> > > +	if (!attributes)
> > > +		got error3;
> I'm so sorry for that:(
> > Please, compile-check patches before sending them out :-)
> Thanks for your advice, I'll do it.
> 
> The new patch , which has been compile-checked, is here:
> 
> Description:
> Because malloc/kzalloc may fail, we should check kmalloc/kzalloc return value 
>  in sm_create_sysfs_attributes(), mtd/sm_rtl.c and do error handling.
> Meanwhile, we should check sm_create_sysfs_attributes return value.
> 
> Signed-off-by: Xiaochen Wang <wangxiaochen0 at gmail.com>

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list