Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

Remember to collect the exit status from 'stk1160_read_reg()' in 'rc'
before testing it for less than zero.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Jesper Juhl and committed by
Mauro Carvalho Chehab
7c72e19d 56411c0f

+1 -1
+1 -1
drivers/media/usb/stk1160/stk1160-i2c.c
··· 116 116 if (rc < 0) 117 117 return rc; 118 118 119 - stk1160_read_reg(dev, STK1160_SBUSR_RD, value); 119 + rc = stk1160_read_reg(dev, STK1160_SBUSR_RD, value); 120 120 if (rc < 0) 121 121 return rc; 122 122