From b58c4649d94eebb1257e0716e4e948dcaa4ae5b5 Mon Sep 17 00:00:00 2001 From: wengjianfeng Date: Tue, 6 Apr 2021 09:59:54 +0800 Subject: 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 Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller --- drivers/nfc/s3fwrn5/core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/nfc') 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 = { -- cgit v1.2.3