summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorRobert Dolca <robert.dolca@intel.com>2015-10-22 05:11:36 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-25 14:11:58 -0400
commite4dbd62528931951aa9d3b313ee7d536df5069fc (patch)
tree638fe2a2cdf4b5fd9c6be0a2a85940a323e08ea0 /net/nfc
parenta9433c11b1aa0639cc6e4842fff52af2422af06d (diff)
NFC: nci: Do not call post_setup when setup fails
The driver should know that it can continue with post setup where setup left off. Being able to execute post_setup when setup fails may force the developer to keep this state in the driver. Signed-off-by: Robert Dolca <robert.dolca@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/nci/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 090972033a15..5362d8f543e7 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -402,9 +402,8 @@ static int nci_open_device(struct nci_dev *ndev)
402 msecs_to_jiffies(NCI_INIT_TIMEOUT)); 402 msecs_to_jiffies(NCI_INIT_TIMEOUT));
403 } 403 }
404 404
405 if (ndev->ops->post_setup) { 405 if (!rc && ndev->ops->post_setup)
406 rc = ndev->ops->post_setup(ndev); 406 rc = ndev->ops->post_setup(ndev);
407 }
408 407
409 if (!rc) { 408 if (!rc) {
410 rc = __nci_request(ndev, nci_init_complete_req, 0, 409 rc = __nci_request(ndev, nci_init_complete_req, 0,