* [PATCH v2] NFC: nxp-nci: remove unnecessary label
@ 2021-06-18 8:52 samirweng1979
2021-06-18 9:01 ` Krzysztof Kozlowski
2021-06-18 20:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: samirweng1979 @ 2021-06-18 8:52 UTC (permalink / raw)
To: charles.gorand, krzysztof.kozlowski; +Cc: netdev, linux-kernel, wengjianfeng
From: wengjianfeng <wengjianfeng@yulong.com>
Remove unnecessary label chunk_exit and return directly.
Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
drivers/nfc/nxp-nci/firmware.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/nfc/nxp-nci/firmware.c b/drivers/nfc/nxp-nci/firmware.c
index dae0c80..119bf30 100644
--- a/drivers/nfc/nxp-nci/firmware.c
+++ b/drivers/nfc/nxp-nci/firmware.c
@@ -95,10 +95,8 @@ static int nxp_nci_fw_send_chunk(struct nxp_nci_info *info)
int r;
skb = nci_skb_alloc(info->ndev, info->max_payload, GFP_KERNEL);
- if (!skb) {
- r = -ENOMEM;
- goto chunk_exit;
- }
+ if (!skb)
+ return -ENOMEM;
chunk_len = info->max_payload - NXP_NCI_FW_HDR_LEN - NXP_NCI_FW_CRC_LEN;
remaining_len = fw_info->frame_size - fw_info->written;
@@ -124,7 +122,6 @@ static int nxp_nci_fw_send_chunk(struct nxp_nci_info *info)
kfree_skb(skb);
-chunk_exit:
return r;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] NFC: nxp-nci: remove unnecessary label
2021-06-18 8:52 [PATCH v2] NFC: nxp-nci: remove unnecessary label samirweng1979
@ 2021-06-18 9:01 ` Krzysztof Kozlowski
2021-06-18 20:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-18 9:01 UTC (permalink / raw)
To: samirweng1979, charles.gorand; +Cc: netdev, linux-kernel, wengjianfeng
On 18/06/2021 10:52, samirweng1979 wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
>
> Remove unnecessary label chunk_exit and return directly.
>
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> ---
> drivers/nfc/nxp-nci/firmware.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Best regards,
Krzysztof
> diff --git a/drivers/nfc/nxp-nci/firmware.c b/drivers/nfc/nxp-nci/firmware.c
> index dae0c80..119bf30 100644
> --- a/drivers/nfc/nxp-nci/firmware.c
> +++ b/drivers/nfc/nxp-nci/firmware.c
> @@ -95,10 +95,8 @@ static int nxp_nci_fw_send_chunk(struct nxp_nci_info *info)
> int r;
>
> skb = nci_skb_alloc(info->ndev, info->max_payload, GFP_KERNEL);
> - if (!skb) {
> - r = -ENOMEM;
> - goto chunk_exit;
> - }
> + if (!skb)
> + return -ENOMEM;
>
> chunk_len = info->max_payload - NXP_NCI_FW_HDR_LEN - NXP_NCI_FW_CRC_LEN;
> remaining_len = fw_info->frame_size - fw_info->written;
> @@ -124,7 +122,6 @@ static int nxp_nci_fw_send_chunk(struct nxp_nci_info *info)
>
> kfree_skb(skb);
>
> -chunk_exit:
> return r;
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] NFC: nxp-nci: remove unnecessary label
2021-06-18 8:52 [PATCH v2] NFC: nxp-nci: remove unnecessary label samirweng1979
2021-06-18 9:01 ` Krzysztof Kozlowski
@ 2021-06-18 20:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-18 20:00 UTC (permalink / raw)
To: samirweng1979
Cc: charles.gorand, krzysztof.kozlowski, netdev, linux-kernel, wengjianfeng
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Fri, 18 Jun 2021 16:52:26 +0800 you wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
>
> Remove unnecessary label chunk_exit and return directly.
>
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> ---
> drivers/nfc/nxp-nci/firmware.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Here is the summary with links:
- [v2] NFC: nxp-nci: remove unnecessary label
https://git.kernel.org/netdev/net-next/c/7437a2230e39
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:[~2021-06-18 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 8:52 [PATCH v2] NFC: nxp-nci: remove unnecessary label samirweng1979
2021-06-18 9:01 ` Krzysztof Kozlowski
2021-06-18 20:00 ` 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).