Commit b58c4649 authored by wengjianfeng's avatar wengjianfeng Committed by David S. Miller

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: default avatarwengjianfeng <wengjianfeng@yulong.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3feb439
......@@ -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 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment