diff options
author | Rafael J. Wysocki <[email protected]> | 2016-01-30 12:54:29 +0100 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2016-02-03 19:10:37 +0100 |
commit | e79aee49bcf9ad005b3f2f4cf68b17dc2c22d9c2 (patch) | |
tree | 15ccff24ec3b0f789c2c0da116551e6759516c94 /net/switchdev | |
parent | 5be6ada39f3f11a14fae9c6c328bcc78cf476e2e (diff) |
PM: Avoid false-positive warnings in dev_pm_domain_set()
There is a WARN_ON() in dev_pm_domain_set() that triggers on attempts
to set the pm_domain pointer for devices with a driver bound.
However, that WARN_ON() triggers on attempts to clear the pointer
too and the test it uses is based on checking the device's
p->knode_driver pointer which still is set when the device bus
type's/driver's ->remove callback has been executed. This
leads to false-positive warnings when bus type code calls
dev_pm_domain_set() to clear the pm_domain pointer after
invoking the driver's ->remove() callback.
To avoid those false-positives, make dev_pm_domain_set() check
if the pointer passed to it is NULL and skip the warning in
that case.
Fixes: 989561de9b51 (PM / Domains: add setter for dev.pm_domain)
Signed-off-by: Rafael J. Wysocki <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Tested-by: Sinan Kaya <[email protected]>
Tested-by: Steven Rostedt <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'net/switchdev')
0 files changed, 0 insertions, 0 deletions