lkml.org 
[lkml]   [2021]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] NFC: nxp-nci: remove unnecessary labels
From
Date
On 15/06/2021 03:52, samirweng1979 wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
>
> Some labels are meaningless, so we delete them and use the
> return statement instead of the goto statement.
>
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> ---
> 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

\
 
 \ /
  Last update: 2021-06-15 09:18    [W:0.056 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site