On Mon, Feb 20, 2017 at 10:40:28PM +0530, sayli karnik wrote:
Change array index from the loop bound variable to loop index. If a poll file fails to open for any intermediate device, all poll files with fds of devices from 0 upto that device must be closed in the open_poll_files() function. The current code only closes the poll file with the most recent fd allocated, and at times tries to close the same file multiple times.
Detected by coccinelle:
@@ expression arr,ex1,ex2; @@
for(ex1 = 0; ex1 < ex2; ex1++) { <... arr[
- ex2
- ex1 ] ...> }
Signed-off-by: sayli karnik karniksayli1995@gmail.com
v2: Made the subject and changelog more concise
Thanks for the update.
Reviewed-by: Johan Hovold johan@kernel.org
Johan