Hi!
From: wengjianfeng wengjianfeng@yulong.com
[ Upstream commit 96a19319921ceb4b2f4c49d1b9bf9de1161e30ca ]
Simplify the code by removing unnecessary labels and returning directly.
Ok, but is there reason for changing the error code? ENOTSUPP -> EOPNOTSUPP?
Best regards, Pavel
+++ 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;