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    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site