* [patch] ACPI / proc: remove unneeded NULL check
@ 2014-01-30 11:55 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-01-30 11:55 UTC (permalink / raw)
To: Len Brown; +Cc: Rafael J. Wysocki, linux-acpi, kernel-janitors
We already verified that "ldev" was non-NULL earlier and also we
dereference again without checking a three lines later.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 50fe34ffe932..75c28eae8860 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -60,7 +60,7 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
seq_printf(seq, "%c%-8s %s:%s\n",
dev->wakeup.flags.run_wake ? '*' : ' ',
(device_may_wakeup(&dev->dev) ||
- (ldev && device_may_wakeup(ldev))) ?
+ device_may_wakeup(ldev)) ?
"enabled" : "disabled",
ldev->bus ? ldev->bus->name :
"no-bus", dev_name(ldev));
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-30 11:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-30 11:55 [patch] ACPI / proc: remove unneeded NULL check Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).