Thread (2 messages) flat view 2 messages, 2 authors, 2021-06-15

Re: [PATCH] NFC: nxp-nci: remove unnecessary labels

From: Krzysztof Kozlowski <hidden>
Date: 2021-06-15 07:17:45
Also in: lkml

On 15/06/2021 03:52, samirweng1979 wrote:
quoted hunk ↗ jump to hunk
From: wengjianfeng <redacted>

Some labels are meaningless, so we delete them and use the
return statement instead of the goto statement.

Signed-off-by: wengjianfeng <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help