[media] stb6100: fix buffer length check in stb6100_write_reg_range()
authorAlexander Shiyan <shc_work@mail.ru>
Wed, 26 Feb 2014 02:41:14 +0000 (23:41 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 28 Feb 2014 18:20:33 +0000 (15:20 -0300)
We are checking sizeof() the wrong variable!

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/stb6100.c

index cea175d1989076e8f53cc3550efefe7a48dabf88..4ef8a5c7003e907c2836e3ad77f6306fbafe1576 100644 (file)
@@ -193,7 +193,7 @@ static int stb6100_write_reg_range(struct stb6100_state *state, u8 buf[], int st
                .len    = len + 1
        };
 
-       if (1 + len > sizeof(buf)) {
+       if (1 + len > sizeof(cmdbuf)) {
                printk(KERN_WARNING
                       "%s: i2c wr: len=%d is too big!\n",
                       KBUILD_MODNAME, len);