[media] cx18: check for allocation failure in cx18_read_eeprom()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 22 Nov 2013 07:51:47 +0000 (04:51 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 10 Dec 2013 17:36:11 +0000 (15:36 -0200)
commite351bf25fa373a3de0be2141b962c5c3c27006a2
tree5d2fd02808c2a0c962afe35363da2e71b13b4d91
parenteda9dfd6752e58c5c075076654007311da6b5268
[media] cx18: check for allocation failure in cx18_read_eeprom()

It upsets static checkers when we don't check for allocation failure.  I
moved the memset() of "tv" earlier so we don't use uninitialized data on
error.
Fixes: 1d212cf0c2d8 ('[media] cx18: struct i2c_client is too big for stack')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/pci/cx18/cx18-driver.c