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

Commit 81859ab8 authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz
Browse files

NFC: nci: Add NCI_RESET return code check before setup



setup was executed in any case, even if NCI_RESET failed.

Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent b6355e97
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -347,8 +347,9 @@ static int nci_open_device(struct nci_dev *ndev)
	rc = __nci_request(ndev, nci_reset_req, 0,
			   msecs_to_jiffies(NCI_RESET_TIMEOUT));

	if (ndev->ops->setup)
		ndev->ops->setup(ndev);
	if (!rc && ndev->ops->setup) {
		rc = ndev->ops->setup(ndev);
	}

	if (!rc) {
		rc = __nci_request(ndev, nci_init_req, 0,