Commit a6e226c2 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Greg Kroah-Hartman

stb6100: fix buffer length check in stb6100_write_reg_range()

commit 7e6bd12f upstream.

We are checking sizeof() the wrong variable!
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ae8ffd3
...@@ -193,7 +193,7 @@ static int stb6100_write_reg_range(struct stb6100_state *state, u8 buf[], int st ...@@ -193,7 +193,7 @@ static int stb6100_write_reg_range(struct stb6100_state *state, u8 buf[], int st
.len = len + 1 .len = len + 1
}; };
if (1 + len > sizeof(buf)) { if (1 + len > sizeof(cmdbuf)) {
printk(KERN_WARNING printk(KERN_WARNING
"%s: i2c wr: len=%d is too big!\n", "%s: i2c wr: len=%d is too big!\n",
KBUILD_MODNAME, len); KBUILD_MODNAME, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment