aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-16 13:09:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-16 13:09:34 -0500
commit77fb61a04a0483ad274ce5c51b02c46c12db3693 (patch)
treeccab99b5c8ea4e3cc26226fa831763429165d077 /drivers/acpi/sleep
parentb42ccbc521f2acad48eb96b32883efe2f3e16b45 (diff)
acpi: fix oops in acpi_system_wakeup_device_seq_show
Commit 0794469da3f7b2093575cbdfc1108308dd3641ce: ("ACPI: struct device - replace bus_id with dev_name(), dev_set_name()") introduced a bug by testing 'dev_name(ldev)' instead of 'ldev->bus' for NULL when printing out the bus information. So if ldev->bus was NULL, we'd oops. Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Len Brown <len.brown@intel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/acpi/sleep')
-rw-r--r--drivers/acpi/sleep/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 64e591ba86f2..4dbc2271acf5 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -366,7 +366,7 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
366 dev->wakeup.state.enabled ? "enabled" : "disabled"); 366 dev->wakeup.state.enabled ? "enabled" : "disabled");
367 if (ldev) 367 if (ldev)
368 seq_printf(seq, "%s:%s", 368 seq_printf(seq, "%s:%s",
369 dev_name(ldev) ? ldev->bus->name : "no-bus", 369 ldev->bus ? ldev->bus->name : "no-bus",
370 dev_name(ldev)); 370 dev_name(ldev));
371 seq_printf(seq, "\n"); 371 seq_printf(seq, "\n");
372 put_device(ldev); 372 put_device(ldev);