lkml.org 
[lkml]   [2015]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 5/9] nfc: nci: Do not call post_setup when setup fails
    Date
    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>
    ---
    net/nfc/nci/core.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
    index e2bd5f4..29607f9 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)
    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,
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-09-01 17:21    [W:2.527 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site