From: Jesper Juhl Date: Fri, 12 Oct 2012 22:16:37 +0000 (-0300) Subject: [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c72e19dcf7f9a49eedab328ebf7c0a45d76716d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c b/drivers/media/usb/stk1160/stk1160-i2c.c index 176ac937306b..850cf285ada8 100644 --- a/drivers/media/usb/stk1160/stk1160-i2c.c +++ b/drivers/media/usb/stk1160/stk1160-i2c.c @@ -116,7 +116,7 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 addr, if (rc < 0) return rc; - stk1160_read_reg(dev, STK1160_SBUSR_RD, value); + rc = stk1160_read_reg(dev, STK1160_SBUSR_RD, value); if (rc < 0) return rc;