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