summaryrefslogtreecommitdiff
path: root/drivers/nfc/s3fwrn5
diff options
context:
space:
mode:
authorwengjianfeng <wengjianfeng@yulong.com>2021-04-06 09:59:54 +0800
committerDavid S. Miller <davem@davemloft.net>2021-04-06 16:24:20 -0700
commitb58c4649d94eebb1257e0716e4e948dcaa4ae5b5 (patch)
tree2f8cc58dea4e66f59395e09ea9b5839e13d0cef0 /drivers/nfc/s3fwrn5
parentb3feb439f28ed523e57096142e752d2ffd8ca962 (diff)
nfc: s3fwrn5: remove unnecessary label
In function s3fwrn5_nci_post_setup, the variable ret is assigned then goto out label, which just return ret, so we use return to replace it. Other goto sentences are similar, we use return sentences to replace goto sentences and delete out label. Signed-off-by: wengjianfeng <wengjianfeng@yulong.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/s3fwrn5')
-rw-r--r--drivers/nfc/s3fwrn5/core.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c
index c00b7a07c3ee..865d3e3d1528 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 = {