mtd: sm_rtl: check kmalloc return value
authorXiaochen Wang <wangxiaochen0@gmail.com>
Thu, 10 Mar 2011 14:31:39 +0000 (22:31 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 11 Mar 2011 14:27:10 +0000 (14:27 +0000)
commit629286b9561982e90a6d49893a1c641e71b6a2a3
treecb32198537f69897e2640724972db9bb52c574d8
parent1065cda8a1a57d0d3bfccdce1a655a84439d24e0
mtd: sm_rtl: check kmalloc return value

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@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/sm_ftl.c