aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/i2o/driver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index d3235f213c89..d330e4eb86ac 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -123,8 +123,12 @@ int i2o_driver_register(struct i2o_driver *drv)
123 } 123 }
124 124
125 rc = driver_register(&drv->driver); 125 rc = driver_register(&drv->driver);
126 if (rc) 126 if (rc) {
127 destroy_workqueue(drv->event_queue); 127 if (drv->event) {
128 destroy_workqueue(drv->event_queue);
129 drv->event_queue = NULL;
130 }
131 }
128 132
129 return rc; 133 return rc;
130}; 134};