Re: [PATCH v2] staging: greybus: loopback_test: Fix open error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
> v2:
> Made the subject and changelog more concise

Thanks for the update.

Reviewed-by: Johan Hovold <johan@xxxxxxxxxx>

Johan
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux