nfc: s3fwrn5: remove unnecessary label
authorwengjianfeng <wengjianfeng@yulong.com>
Tue, 6 Apr 2021 01:59:54 +0000 (09:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Apr 2021 23:24:20 +0000 (16:24 -0700)
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>
drivers/nfc/s3fwrn5/core.c

index c00b7a0..865d3e3 100644 (file)
@@ -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 = {