Attention is currently required from: Nico Huber, Angel Pons.
4 comments:
File linux_spi.c:
Patch Set #1, Line 71: struct linux_spi_data *spi_data = data;
Same thing may be in other shutdown functions, but since I will be going through all them soon, will try to fix where I can.
Patch Set #1, Line 176: int fd;
First time this variable is used, it is immediately assigned as open(dev, ...) line 204, so default value is not needed. And since it is local, it will be created again every time init runs.
Patch Set #1, Line 208: return 1;
For this error path and all the above, close(fd) is not needed, because fd hasn't been opened yet.
All the error paths below this one should goto init_err because it does cleanup i.e. close(fd).
Patch Set #1, Line 252: return 1;
Since SPI_GENERIC_ERROR is not used anymore, ret variable is not needed because init error always returns 1.
To view, visit change 52492. To unsubscribe, or for help writing mail filters, visit settings.