Message ID | 20201213095850.28169-1-bongsu.jeon@samsung.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a4485baefa1efa596702ebffd5a9c760d42b14b5 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] nfc: s3fwrn5: Release the nfc firmware | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 11 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Sun, Dec 13, 2020 at 06:58:50PM +0900, Bongsu Jeon wrote: > From: Bongsu Jeon <bongsu.jeon@samsung.com> > > add the code to release the nfc firmware when the firmware image size is > wrong. s/add/Add/ s/nfc/NFC/ Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sun, 13 Dec 2020 18:58:50 +0900 you wrote: > From: Bongsu Jeon <bongsu.jeon@samsung.com> > > add the code to release the nfc firmware when the firmware image size is > wrong. > > Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> > > [...] Here is the summary with links: - [net-next] nfc: s3fwrn5: Release the nfc firmware https://git.kernel.org/netdev/net-next/c/a4485baefa1e You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/nfc/s3fwrn5/firmware.c b/drivers/nfc/s3fwrn5/firmware.c index 4b5352e2b915..b70737b3070e 100644 --- a/drivers/nfc/s3fwrn5/firmware.c +++ b/drivers/nfc/s3fwrn5/firmware.c @@ -293,8 +293,10 @@ int s3fwrn5_fw_request_firmware(struct s3fwrn5_fw_info *fw_info) if (ret < 0) return ret; - if (fw->fw->size < S3FWRN5_FW_IMAGE_HEADER_SIZE) + if (fw->fw->size < S3FWRN5_FW_IMAGE_HEADER_SIZE) { + release_firmware(fw->fw); return -EINVAL; + } memcpy(fw->date, fw->fw->data + 0x00, 12); fw->date[12] = '\0';