diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-frontends/af9033.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index 30ee59052157..65728c25ea05 100644 --- a/drivers/media/dvb-frontends/af9033.c +++ b/drivers/media/dvb-frontends/af9033.c | |||
@@ -170,18 +170,18 @@ static int af9033_rd_reg_mask(struct af9033_state *state, u32 reg, u8 *val, | |||
170 | static int af9033_wr_reg_val_tab(struct af9033_state *state, | 170 | static int af9033_wr_reg_val_tab(struct af9033_state *state, |
171 | const struct reg_val *tab, int tab_len) | 171 | const struct reg_val *tab, int tab_len) |
172 | { | 172 | { |
173 | #define MAX_TAB_LEN 212 | ||
173 | int ret, i, j; | 174 | int ret, i, j; |
174 | u8 buf[MAX_XFER_SIZE]; | 175 | u8 buf[1 + MAX_TAB_LEN]; |
176 | |||
177 | dev_dbg(&state->i2c->dev, "%s: tab_len=%d\n", __func__, tab_len); | ||
175 | 178 | ||
176 | if (tab_len > sizeof(buf)) { | 179 | if (tab_len > sizeof(buf)) { |
177 | dev_warn(&state->i2c->dev, | 180 | dev_warn(&state->i2c->dev, "%s: tab len %d is too big\n", |
178 | "%s: i2c wr len=%d is too big!\n", | 181 | KBUILD_MODNAME, tab_len); |
179 | KBUILD_MODNAME, tab_len); | ||
180 | return -EINVAL; | 182 | return -EINVAL; |
181 | } | 183 | } |
182 | 184 | ||
183 | dev_dbg(&state->i2c->dev, "%s: tab_len=%d\n", __func__, tab_len); | ||
184 | |||
185 | for (i = 0, j = 0; i < tab_len; i++) { | 185 | for (i = 0, j = 0; i < tab_len; i++) { |
186 | buf[j] = tab[i].val; | 186 | buf[j] = tab[i].val; |
187 | 187 | ||