Re: [PATCHv2] i2c: slave-eeprom: Make it possible to pre-load eeprom data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux