On 4/24/20 1:13 PM, Wolfram Sang wrote:
On second look, two questions:+ if (!error) { + int ret = request_firmware_into_buf(&fw, eeprom_data, &client->dev, + eeprom->buffer, size); + if (ret) + return ret;Aren't we leaking 'fw' here?
As I can see in drivers/base/firmware_loader/main.c in function _request_firmware, then the fw will be released internally if it returns an error value.
Also, do we need 'error' and 'ret'? Can't we reuse one of them?
Yes, I can fix that. /BA