Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e578e9a1cc8a5983d87126d5877e305d3189f1b9
Commit:     e578e9a1cc8a5983d87126d5877e305d3189f1b9
Parent:     b3762bfc8d046342db664d855f8f875e8a4c2ca1
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 13:58:05 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 23 20:14:14 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/message/i2o/driver.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index d3235f2..d330e4e 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)
        }
 
        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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to