lkml.org 
[lkml]   [2010]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 11/14] staging: hv: fix device_register() error handling
    Date
    If device_register() fails then call put_device().
    See comment to device_register.

    Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
    ---
    compile tested.

    drivers/staging/hv/vmbus_drv.c | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)

    diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
    index ad29887..255e4b2 100644
    --- a/drivers/staging/hv/vmbus_drv.c
    +++ b/drivers/staging/hv/vmbus_drv.c
    @@ -345,6 +345,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
    DPRINT_ERR(VMBUS_DRV,
    "ERROR - Unable to register vmbus root device");

    + put_device(&dev_ctx->device);
    free_irq(vmbus_irq, NULL);
    bus_unregister(&vmbus_drv_ctx->bus);

    --
    1.7.0.4


    \
     
     \ /
      Last update: 2010-09-19 14:59    [W:0.052 / U:30.196 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site