1 comment:
data = calloc(1, sizeof(struct it85spi_data));
if (!data) {
msg_perr("Unable to allocate space for extra SPI master data.\n");
return SPI_GENERIC_ERROR;
}
spi_master_it85xx.data = data;
if (register_shutdown(it85xx_shutdown, data)) {
goto it85spi_init_error;
this whole block moves towards the end of the function and therefore there is no need for goto's.
in fact don't even bother checking the return value of register_shutdown() as it's useless to do so as every call is always valid. therefore this constructor shall have no free()'s in its error paths and therefore no need for goto's as it is a single phase construction.
To view, visit change 48196. To unsubscribe, or for help writing mail filters, visit settings.