Skip to content

Commit

Permalink
PM: Remove WARN_ON from device_pm_add
Browse files Browse the repository at this point in the history
PM: Remove WARN_ON from device_pm_add

Fix message in device_pm_add() saying that the device will not be
added to dpm_list, although in fact the device is going to be added
to the list regardless of the ordering violation.

Remove the WARN_ON(true) triggered in that situation, because it is
hit by USB very often and spams the users' logs.

This patch fixes bug #11263

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rafael J. Wysocki authored and Greg Kroah-Hartman committed Aug 21, 2008
1 parent c906a48 commit f5a6d95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ void device_pm_add(struct device *dev)
kobject_name(&dev->kobj));
mutex_lock(&dpm_list_mtx);
if (dev->parent) {
if (dev->parent->power.status >= DPM_SUSPENDING) {
dev_warn(dev, "parent %s is sleeping, will not add\n",
if (dev->parent->power.status >= DPM_SUSPENDING)
dev_warn(dev, "parent %s should not be sleeping\n",
dev->parent->bus_id);
WARN_ON(true);
}
} else if (transition_started) {
/*
* We refuse to register parentless devices while a PM
Expand Down

0 comments on commit f5a6d95

Please sign in to comment.