]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: rts_pstor: off by one in for loop
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 29 Mar 2012 18:52:57 +0000 (21:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Apr 2012 16:18:59 +0000 (09:18 -0700)
commit8265f618274063ff7554d1ddf8bd29b7844a2fb0
tree563fa1c91ab64dae91a04254efe6be3ce9029c8f
parent2bd3bf406886455417883d3c313573fc68bc0265
Staging: rts_pstor: off by one in for loop

I already fixed the other similar for loop in this file.  I'm not sure
how I missed this one.  We use seg_no+1 inside the loop so we can't go
right up to the end of the loop.

Also if we don't break out of the loop then we end up past the end of
the array, but with this fix we end up on the last element.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts_pstor/ms.c