staging: vt6655: check for memory allocation failures
authorJi-Hun Kim <ji_hun.kim@samsung.com>
Thu, 5 Apr 2018 07:09:19 +0000 (16:09 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:23:36 +0000 (15:23 +0200)
commit5341ee0adb17d12a96dc5344e0d267cd12b52135
tree14aa3da15749d85d819c83821823a6c390fd40f8
parent05e6557b8ed833546ee2b66ce6b58fecf09f439e
staging: vt6655: check for memory allocation failures

There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Implement error handling code on device_init_rd*, device_init_td*
and vnt_start for the allocation failures.

Signed-off-by: Ji-Hun Kim <ji_hun.kim@samsung.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/device_main.c