diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/bus.c | 9 | ||||
-rw-r--r-- | drivers/base/driver.c | 3 | ||||
-rw-r--r-- | drivers/base/power/main.c | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 055989e94799..2d207ad30336 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -658,9 +658,10 @@ int bus_add_driver(struct device_driver *drv) | |||
658 | pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); | 658 | pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); |
659 | 659 | ||
660 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 660 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
661 | if (!priv) | 661 | if (!priv) { |
662 | return -ENOMEM; | 662 | error = -ENOMEM; |
663 | 663 | goto out_put_bus; | |
664 | } | ||
664 | klist_init(&priv->klist_devices, NULL, NULL); | 665 | klist_init(&priv->klist_devices, NULL, NULL); |
665 | priv->driver = drv; | 666 | priv->driver = drv; |
666 | drv->p = priv; | 667 | drv->p = priv; |
@@ -668,7 +669,7 @@ int bus_add_driver(struct device_driver *drv) | |||
668 | error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, | 669 | error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, |
669 | "%s", drv->name); | 670 | "%s", drv->name); |
670 | if (error) | 671 | if (error) |
671 | goto out_put_bus; | 672 | goto out_unregister; |
672 | 673 | ||
673 | if (drv->bus->p->drivers_autoprobe) { | 674 | if (drv->bus->p->drivers_autoprobe) { |
674 | error = driver_attach(drv); | 675 | error = driver_attach(drv); |
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index ba75184c653c..bf31a0170a48 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
@@ -120,6 +120,9 @@ EXPORT_SYMBOL_GPL(driver_remove_file); | |||
120 | 120 | ||
121 | /** | 121 | /** |
122 | * driver_add_kobj - add a kobject below the specified driver | 122 | * driver_add_kobj - add a kobject below the specified driver |
123 | * @drv: requesting device driver | ||
124 | * @kobj: kobject to add below this driver | ||
125 | * @fmt: format string that names the kobject | ||
123 | * | 126 | * |
124 | * You really don't want to do this, this is only here due to one looney | 127 | * You really don't want to do this, this is only here due to one looney |
125 | * iseries driver, go poke those developers if you are annoyed about | 128 | * iseries driver, go poke those developers if you are annoyed about |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index a96ca86a7b4a..ee9d1c8db0d6 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -479,7 +479,6 @@ static int dpm_suspend(pm_message_t state) | |||
479 | mutex_lock(&dpm_list_mtx); | 479 | mutex_lock(&dpm_list_mtx); |
480 | if (list_empty(&dev->power.entry)) | 480 | if (list_empty(&dev->power.entry)) |
481 | list_add(&dev->power.entry, &dpm_locked); | 481 | list_add(&dev->power.entry, &dpm_locked); |
482 | mutex_unlock(&dpm_list_mtx); | ||
483 | break; | 482 | break; |
484 | } | 483 | } |
485 | mutex_lock(&dpm_list_mtx); | 484 | mutex_lock(&dpm_list_mtx); |
@@ -523,6 +522,7 @@ static void lock_all_devices(void) | |||
523 | 522 | ||
524 | /** | 523 | /** |
525 | * device_suspend - Save state and stop all devices in system. | 524 | * device_suspend - Save state and stop all devices in system. |
525 | * @state: new power management state | ||
526 | * | 526 | * |
527 | * Prevent new devices from being registered, then lock all devices | 527 | * Prevent new devices from being registered, then lock all devices |
528 | * and suspend them. | 528 | * and suspend them. |