From c19fbca307c19bd0d49e86b9417613c90eb9de95 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 27 Jul 2009 16:47:35 -0400 Subject: [PATCH] Staging: hv: check return value of bus_register() Signed-off-by: Bill Pemberton Cc: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/vmbus_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 74419a7eb32..cede0ace9ad 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -380,7 +380,12 @@ int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init) tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_event_dpc, (unsigned long)vmbus_drv_obj); /* Now, register the bus driver with LDM */ - bus_register(&vmbus_drv_ctx->bus); + ret = bus_register(&vmbus_drv_ctx->bus); + if (ret) + { + ret = -1; + goto cleanup; + } /* Get the interrupt resource */ ret = request_irq(vmbus_irq, -- 2.20.1