From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: samirweng1979 <samirweng1979@163.com>, charles.gorand@effinnov.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
wengjianfeng <wengjianfeng@yulong.com>
Subject: Re: [PATCH v2] NFC: nxp-nci: remove unnecessary label
Date: Fri, 18 Jun 2021 11:01:15 +0200 [thread overview]
Message-ID: <8ff9ac28-5d83-ebf8-a6b1-53a2a7b7d912@canonical.com> (raw)
In-Reply-To: <20210618085226.18440-1-samirweng1979@163.com>
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;
> }
>
>
next prev parent reply other threads:[~2021-06-18 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 8:52 [PATCH v2] NFC: nxp-nci: remove unnecessary label samirweng1979
2021-06-18 9:01 ` Krzysztof Kozlowski [this message]
2021-06-18 20:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ff9ac28-5d83-ebf8-a6b1-53a2a7b7d912@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=charles.gorand@effinnov.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=samirweng1979@163.com \
--cc=wengjianfeng@yulong.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).