* [PATCH -next] ACPI / CPPC: fix error return code in acpi_cppc_processor_probe()
@ 2016-09-07 15:39 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2016-09-07 15:39 UTC (permalink / raw)
To: Rafael J . Wysocki, Len Brown; +Cc: Wei Yongjun, linux-acpi
From: Wei Yongjun <weiyongjun1@huawei.com>
Fix to return error code -ENODEV from the get_cpu_device() error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/acpi/cppc_acpi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index ed58883..480a7e1 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -766,8 +766,10 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
/* Add per logical CPU nodes for reading its feedback counters. */
cpu_dev = get_cpu_device(pr->id);
- if (!cpu_dev)
+ if (!cpu_dev) {
+ ret = -ENODEV;
goto out_free;
+ }
ret = kobject_init_and_add(&cpc_ptr->kobj, &cppc_ktype, &cpu_dev->kobj,
"acpi_cppc");
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-07 15:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 15:39 [PATCH -next] ACPI / CPPC: fix error return code in acpi_cppc_processor_probe() Wei Yongjun
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).