提交 e4dbd625 编写于 作者: R Robert Dolca 提交者: Samuel Ortiz

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: NRobert Dolca <robert.dolca@intel.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 a9433c11
......@@ -402,9 +402,8 @@ static int nci_open_device(struct nci_dev *ndev)
msecs_to_jiffies(NCI_INIT_TIMEOUT));
}
if (ndev->ops->post_setup) {
if (!rc && ndev->ops->post_setup)
rc = ndev->ops->post_setup(ndev);
}
if (!rc) {
rc = __nci_request(ndev, nci_init_complete_req, 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册