Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: samirweng1979 <samirweng1979@163.com>
To: krzysztof.kozlowski@canonical.com, k.opasiak@samsung.com
Cc: linux-nfc@lists.01.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
wengjianfeng <wengjianfeng@yulong.com>
Subject: [PATCH] nfc: s3fwrn5: remove unnecessary label
Date: Fri, 2 Apr 2021 20:15:48 +0800 [thread overview]
Message-ID: <20210402121548.3260-1-samirweng1979@163.com> (raw)
From: wengjianfeng <wengjianfeng@yulong.com>
In function s3fwrn5_nci_post_setup, The variable ret is assigned to 0,
then goto out label, but just return ret in out label, so we use
return 0 to replace it. and other goto sentences are similar, we use
return sentences to replace it and delete out label.
Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
drivers/nfc/s3fwrn5/core.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c
index c00b7a0..865d3e3 100644
--- a/drivers/nfc/s3fwrn5/core.c
+++ b/drivers/nfc/s3fwrn5/core.c
@@ -124,13 +124,12 @@ static int s3fwrn5_nci_post_setup(struct nci_dev *ndev)
if (s3fwrn5_firmware_init(info)) {
//skip bootloader mode
- ret = 0;
- goto out;
+ return 0;
}
ret = s3fwrn5_firmware_update(info);
if (ret < 0)
- goto out;
+ return ret;
/* NCI core reset */
@@ -139,12 +138,9 @@ static int s3fwrn5_nci_post_setup(struct nci_dev *ndev)
ret = nci_core_reset(info->ndev);
if (ret < 0)
- goto out;
-
- ret = nci_core_init(info->ndev);
+ return ret;
-out:
- return ret;
+ return nci_core_init(info->ndev);
}
static struct nci_ops s3fwrn5_nci_ops = {
--
1.9.1
next reply other threads:[~2021-04-02 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 12:15 samirweng1979 [this message]
2021-04-02 16:28 ` Krzysztof Kozlowski
2021-07-26 3:29 samirweng1979
2021-07-26 7:55 ` Krzysztof Kozlowski
2021-07-26 11:30 ` 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=20210402121548.3260-1-samirweng1979@163.com \
--to=samirweng1979@163.com \
--cc=k.opasiak@samsung.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfc@lists.01.org \
--cc=netdev@vger.kernel.org \
--cc=wengjianfeng@yulong.com \
--subject='Re: [PATCH] nfc: s3fwrn5: remove unnecessary label' \
/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
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).