Commit a8c3e563 authored by Patrick Mochel's avatar Patrick Mochel

driver model: don't double up() if device registration fails.

I thought this had been fixed some time ago, but must have never been 
picked up..
parent 55b3a2d4
...@@ -134,7 +134,7 @@ int device_add(struct device *dev) ...@@ -134,7 +134,7 @@ int device_add(struct device *dev)
devclass_add_device(dev); devclass_add_device(dev);
register_done: register_done:
if (error) { if (error) {
up(&device_sem); down(&device_sem);
list_del_init(&dev->g_list); list_del_init(&dev->g_list);
list_del_init(&dev->node); list_del_init(&dev->node);
up(&device_sem); up(&device_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment