[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070520142539.GA4207@APFDCB5C>
Date: Sun, 20 May 2007 23:25:39 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: Markus Lidel <Markus.Lidel@...dowconnect.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] i2o: destroy event queue only when drv->event is set
i2o_driver_register() initalizes event queue for driver
only when drv->event is set. So similarly the event queue
should be destroyed only when drv->event is set in the error path.
Otherwise destroy_workqueue() will called with NULL.
Cc: Markus Lidel <Markus.Lidel@...dowconnect.com>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
---
drivers/message/i2o/driver.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: 2.6-mm/drivers/message/i2o/driver.c
===================================================================
--- 2.6-mm.orig/drivers/message/i2o/driver.c
+++ 2.6-mm/drivers/message/i2o/driver.c
@@ -123,8 +123,12 @@ int i2o_driver_register(struct i2o_drive
}
rc = driver_register(&drv->driver);
- if (rc)
- destroy_workqueue(drv->event_queue);
+ if (rc) {
+ if (drv->event) {
+ destroy_workqueue(drv->event_queue);
+ drv->event_queue = NULL;
+ }
+ }
return rc;
};
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists