Attention is currently required from: Thomas Heijligen, Anastasia Klimchuk, Steve Markgraf.
Patch set 1:Code-Review +1
4 comments:
File include/programmer.h:
Patch Set #1, Line 75: extern const struct programmer_entry programmer_linux_gpiod;
Looks like the list is sorted alphabetically
File linux_gpiod.c:
Other places use `strtol()` because it's safer
if (register_spi_bitbang_master(&bitbang_spi_master_gpiod, data))
return 1; /* shutdown function does the cleanup */
return 0;
How about:
```
/* shutdown function does the cleanup */
return register_spi_bitbang_master(&bitbang_spi_master_gpiod, data);
```
if (data) {
if (gpiod_line_bulk_num_lines(&data->bulk) > 0)
gpiod_line_release_bulk(&data->bulk);
free(data);
}
if (chip)
gpiod_chip_close(chip);
I have few questions about the error path exit. […]
At some point we decided to register the shutdown function early so that it does the cleanup in case init fails. If we still do this, looks like we could benefit here too.
To view, visit change 71801. To unsubscribe, or for help writing mail filters, visit settings.