From: Dan Carpenter <dan.carpenter@oracle.com>
To: rafael.j.wysocki@intel.com
Cc: linux-acpi@vger.kernel.org
Subject: [bug report] ACPI: scan: Introduce acpi_fetch_acpi_dev()
Date: Thu, 6 Jan 2022 11:23:17 +0300 [thread overview]
Message-ID: <20220106082317.GA9123@kili> (raw)
Hello Rafael J. Wysocki,
The patch e3c963c49887: "ACPI: scan: Introduce acpi_fetch_acpi_dev()"
from Dec 3, 2021, leads to the following Smatch static checker
warning:
drivers/acpi/scan.c:2619 acpi_scan_init()
warn: missing error code here? 'acpi_fetch_acpi_dev()' failed. 'result' = '0'
drivers/acpi/scan.c
2609 mutex_lock(&acpi_scan_lock);
2610 /*
2611 * Enumerate devices in the ACPI namespace.
2612 */
2613 result = acpi_bus_scan(ACPI_ROOT_OBJECT);
2614 if (result)
2615 goto out;
2616
2617 acpi_root = acpi_fetch_acpi_dev(ACPI_ROOT_OBJECT);
2618 if (!acpi_root)
--> 2619 goto out;
set result = ESOMETHING?
2620
2621 /* Fixed feature devices do not exist on HW-reduced platform */
2622 if (!acpi_gbl_reduced_hardware) {
2623 result = acpi_bus_scan_fixed();
2624 if (result) {
2625 acpi_detach_data(acpi_root->handle,
2626 acpi_scan_drop_device);
2627 acpi_device_del(acpi_root);
2628 acpi_bus_put_acpi_device(acpi_root);
2629 goto out;
2630 }
2631 }
2632
2633 acpi_turn_off_unused_power_resources();
2634
2635 acpi_scan_initialized = true;
2636
2637 out:
2638 mutex_unlock(&acpi_scan_lock);
2639 return result;
2640 }
regards,
dan carpenter
reply other threads:[~2022-01-06 8:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220106082317.GA9123@kili \
--to=dan.carpenter@oracle.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.