diff options
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r-- | drivers/base/power/suspend.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 9d6701cd7f10..19fae88de7b3 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -55,13 +55,12 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
55 | dev_dbg(dev, "PM: suspend %d-->%d\n", | 55 | dev_dbg(dev, "PM: suspend %d-->%d\n", |
56 | dev->power.power_state.event, state.event); | 56 | dev->power.power_state.event, state.event); |
57 | } | 57 | } |
58 | if (dev->power.pm_parent | 58 | if (dev->parent && dev->parent->power.power_state.event) { |
59 | && dev->power.pm_parent->power.power_state.event) { | ||
60 | dev_err(dev, | 59 | dev_err(dev, |
61 | "PM: suspend %d->%d, parent %s already %d\n", | 60 | "PM: suspend %d->%d, parent %s already %d\n", |
62 | dev->power.power_state.event, state.event, | 61 | dev->power.power_state.event, state.event, |
63 | dev->power.pm_parent->bus_id, | 62 | dev->parent->bus_id, |
64 | dev->power.pm_parent->power.power_state.event); | 63 | dev->parent->power.power_state.event); |
65 | } | 64 | } |
66 | 65 | ||
67 | dev->power.prev_state = dev->power.power_state; | 66 | dev->power.prev_state = dev->power.power_state; |