From: Hans Verkuil Date: Fri, 4 Oct 2013 14:01:43 +0000 (-0300) Subject: cxd2820r_core: fix sparse warnings X-Git-Tag: firefly_0821_release~3679^2~3269 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a5eec39a11a81c1f3b4adcd1839187b5299ddc42;p=firefly-linux-kernel-4.4.55.git cxd2820r_core: fix sparse warnings commit 0db3fa2741ad8371c21b3a6785416a4afc0cc1d4 upstream. drivers/media/dvb-frontends/cxd2820r_core.c:34:32: error: cannot size expression drivers/media/dvb-frontends/cxd2820r_core.c:68:32: error: cannot size expression Signed-off-by: Hans Verkuil Acked-by: Antti Palosaari Reviewed-by: Antti Palosaari Reviewed-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab Cc: Frederik Himpe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c index 51447a04d8f2..03930d5e9fea 100644 --- a/drivers/media/dvb-frontends/cxd2820r_core.c +++ b/drivers/media/dvb-frontends/cxd2820r_core.c @@ -34,7 +34,7 @@ static int cxd2820r_wr_regs_i2c(struct cxd2820r_priv *priv, u8 i2c, u8 reg, { .addr = i2c, .flags = 0, - .len = sizeof(buf), + .len = len + 1, .buf = buf, } }; @@ -75,7 +75,7 @@ static int cxd2820r_rd_regs_i2c(struct cxd2820r_priv *priv, u8 i2c, u8 reg, }, { .addr = i2c, .flags = I2C_M_RD, - .len = sizeof(buf), + .len = len, .buf = buf, } };