Thread (8 messages) 8 messages, 2 authors, 2021-10-17

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

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2021-10-17 05:27:00

On Tue, Aug 31, 2021 at 10:25:06PM +0200, Marek Vasut wrote:
quoted hunk ↗ jump to hunk
+
+	/* 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.

Thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help