Messages in this thread Patch in this message | | | Date | Sat, 19 Oct 2002 03:27:27 -0400 | From | Andres Salomon <> | Subject | [PATCH] 2.5.44 device_add double up() of device_sem |
| |
I noticed this while tracking down an oops. If there's any sort of error in device_add(), register_done is jumped to. At that point, device_sem is up()'d twice. This patch fixes that.
-- It's not denial. I'm just selective about the reality I accept. -- Bill Watterson --- a/drivers/base/core.c 2002-10-19 02:45:26.000000000 -0400 +++ b/drivers/base/core.c 2002-10-19 03:07:35.000000000 -0400 @@ -59,7 +59,7 @@ devclass_add_device(dev); register_done: if (error) { - up(&device_sem); + down(&device_sem); list_del_init(&dev->g_list); list_del_init(&dev->node); up(&device_sem); | |