Re: [PATCH] NFC: nxp-nci: remove unnecessary labels
From: Krzysztof Kozlowski
Date: Tue Jun 15 2021 - 03:17:46 EST
On 15/06/2021 03:52, samirweng1979 wrote:
> From: wengjianfeng <wengjianfeng@xxxxxxxxxx>
>
> Some labels are meaningless, so we delete them and use the
> return statement instead of the goto statement.
>
> Signed-off-by: wengjianfeng <wengjianfeng@xxxxxxxxxx>
> ---
> drivers/nfc/nxp-nci/core.c | 39 +++++++++++++--------------------------
> 1 file changed, 13 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/nfc/nxp-nci/core.c b/drivers/nfc/nxp-nci/core.c
> index a0ce95a..2b0c723 100644
> --- a/drivers/nfc/nxp-nci/core.c
> +++ b/drivers/nfc/nxp-nci/core.c
> @@ -70,21 +70,16 @@ static int nxp_nci_send(struct nci_dev *ndev, struct sk_buff *skb)
> struct nxp_nci_info *info = nci_get_drvdata(ndev);
> int r;
>
> - if (!info->phy_ops->write) {
> - r = -ENOTSUPP;
> - goto send_exit;
> - }
> + if (!info->phy_ops->write)
> + return -EOPNOTSUPP;
You changed ENOTSUPP into EOPNOTSUPP, which unrelated to the patch. Make
it a separate patch with its own explanation.
Best regards,
Krzysztof