Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9fc36f4 authored by Szymon Janc's avatar Szymon Janc Committed by Samuel Ortiz
Browse files

NFC: Remove not needed local variable in nci_set_local_general_bytes



No need for local rc variable as result of nci_request can be returned
directly.

Signed-off-by: default avatarSzymon Janc <szymon.janc@tieto.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 460d8f97
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -414,11 +414,11 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
	struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
	struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
	struct nci_set_config_param param;
	struct nci_set_config_param param;
	__u8 local_gb[NFC_MAX_GT_LEN];
	__u8 local_gb[NFC_MAX_GT_LEN];
	int i, rc = 0;
	int i;


	param.val = nfc_get_local_general_bytes(nfc_dev, &param.len);
	param.val = nfc_get_local_general_bytes(nfc_dev, &param.len);
	if ((param.val == NULL) || (param.len == 0))
	if ((param.val == NULL) || (param.len == 0))
		return rc;
		return 0;


	if (param.len > NFC_MAX_GT_LEN)
	if (param.len > NFC_MAX_GT_LEN)
		return -EINVAL;
		return -EINVAL;
@@ -429,10 +429,8 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
	param.id = NCI_PN_ATR_REQ_GEN_BYTES;
	param.id = NCI_PN_ATR_REQ_GEN_BYTES;
	param.val = local_gb;
	param.val = local_gb;


	rc = nci_request(ndev, nci_set_config_req, (unsigned long)&param,
	return nci_request(ndev, nci_set_config_req, (unsigned long)&param,
			   msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT));
			   msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT));

	return rc;
}
}


static int nci_start_poll(struct nfc_dev *nfc_dev,
static int nci_start_poll(struct nfc_dev *nfc_dev,