* [PATCH net-next] nfc: s3fwrn5: Release the nfc firmware
@ 2020-12-13 9:58 Bongsu Jeon
2020-12-14 15:47 ` Krzysztof Kozlowski
2020-12-15 3:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Bongsu Jeon @ 2020-12-13 9:58 UTC (permalink / raw)
To: krzk; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon
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>
---
drivers/nfc/s3fwrn5/firmware.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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';
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] nfc: s3fwrn5: Release the nfc firmware
2020-12-13 9:58 [PATCH net-next] nfc: s3fwrn5: Release the nfc firmware Bongsu Jeon
@ 2020-12-14 15:47 ` Krzysztof Kozlowski
2020-12-15 3:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2020-12-14 15:47 UTC (permalink / raw)
To: Bongsu Jeon; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] nfc: s3fwrn5: Release the nfc firmware
2020-12-13 9:58 [PATCH net-next] nfc: s3fwrn5: Release the nfc firmware Bongsu Jeon
2020-12-14 15:47 ` Krzysztof Kozlowski
@ 2020-12-15 3:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-12-15 3:30 UTC (permalink / raw)
To: Bongsu Jeon; +Cc: krzk, linux-nfc, netdev, linux-kernel, bongsu.jeon
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-15 3:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-13 9:58 [PATCH net-next] nfc: s3fwrn5: Release the nfc firmware Bongsu Jeon
2020-12-14 15:47 ` Krzysztof Kozlowski
2020-12-15 3:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).