提交 b58c4649 编写于 作者: W wengjianfeng 提交者: 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: Nwengjianfeng <wengjianfeng@yulong.com>
Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册