3 comments:
Patch Set #8, Line 240: (struct it85spi_data *)
Is this explicit cast really needed? Typically I would no expect this for cast-from-void *.
Patch Set #8, Line 308: free(data);
nit: In general, this would be a bit more robust using gotos:
int ret;
...
if (...) {
ret = 1;
goto free_data;
}
...
if (...) {
ret = 1;
goto free_data;
}
...
return 0;
free_data:
free(data);
return ret;
Patch Set #8, Line 338: free(data);
on second thought ... if you already called register_shutdown() ... will it85xx_shutdown() get called now when if this function exits with "1"? If so, won't this now be a double free()?
To view, visit change 47655. To unsubscribe, or for help writing mail filters, visit settings.