Re: [PATCH v3 3/3] Input: ili210x - add ili251x firmware update support

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

 



On 10/17/21 7:26 AM, Dmitry Torokhov wrote:
On Tue, Aug 31, 2021 at 10:25:06PM +0200, Marek Vasut wrote:
+
+	/* DF end address is the last address in the firmware blob */
+	*df_end = fw_addr + fw_len;
+	*buf = fw_buf;
+	release_firmware(fw);
+	return 0;
+err_big:
+	kfree(fw_buf);
+err_alloc:
+	release_firmware(fw);
+	return error;

I do not quite like that we have to release firmware in both success
and error paths, so I moved the call to request_ihex_firmware() to the
caller of this function and release it before checking the result of
loading the firmware to buffer, and applied.

Hmmm, looking at the result, maybe it would be better to do the entire request_ihex_firmware() / release_firmware) in ili251x_firmware_to_buffer(). I'll try and see how that looks and maybe send you a subsequent patch if it looks better.

Otherwise, thanks for picking those up.



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux