OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87736df
)
[media] lg2160: fix off-by-one error in lg216x_write_regs
author
Michael Krufky
<mkrufky@linuxtv.org>
Mon, 21 May 2012 15:28:14 +0000
(12:28 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Mon, 11 Jun 2012 18:59:16 +0000
(15:59 -0300)
Fix an off-by-one error in lg216x_write_regs, causing the last element
of the lg216x init block to be ignored. Spotted by Dan Carpenter.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/lg2160.c
patch
|
blob
|
history
diff --git
a/drivers/media/dvb/frontends/lg2160.c
b/drivers/media/dvb/frontends/lg2160.c
index
a3ab1a5
..
cc11260
100644
(file)
--- a/
drivers/media/dvb/frontends/lg2160.c
+++ b/
drivers/media/dvb/frontends/lg2160.c
@@
-126,7
+126,7
@@
static int lg216x_write_regs(struct lg216x_state *state,
lg_reg("writing %d registers...\n", len);
- for (i = 0; i < len
- 1
; i++) {
+ for (i = 0; i < len; i++) {
ret = lg216x_write_reg(state, regs[i].reg, regs[i].val);
if (lg_fail(ret))
return ret;