lkml.org 
[lkml]   [2013]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] ACPI / scan: Fix acpi_bus_get_device() check in acpi_match_device()
    2013/01/31 7:03, Rafael J. Wysocki wrote:
    > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    >
    > Since acpi_bus_get_device() returns int and not acpi_status, change
    > acpi_match_device() so that it doesn't apply ACPI_FAILURE() to the
    > return value of acpi_bus_get_device().
    >
    > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    > ---

    I have no objection.
    Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>

    > drivers/acpi/scan.c | 4 ++--
    > 1 file changed, 2 insertions(+), 2 deletions(-)
    >
    > Index: linux-pm/drivers/acpi/scan.c
    > ===================================================================
    > --- linux-pm.orig/drivers/acpi/scan.c
    > +++ linux-pm/drivers/acpi/scan.c
    > @@ -491,9 +491,9 @@ const struct acpi_device_id *acpi_match_
    > const struct device *dev)
    > {
    > struct acpi_device *adev;
    > + acpi_handle handle = ACPI_HANDLE(dev);
    >
    > - if (!ids || !ACPI_HANDLE(dev)
    > - || ACPI_FAILURE(acpi_bus_get_device(ACPI_HANDLE(dev), &adev)))
    > + if (!ids || !handle || acpi_bus_get_device(handle, &adev))
    > return NULL;
    >
    > return __acpi_match_device(adev, ids);
    >
    > --
    > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    >




    \
     
     \ /
      Last update: 2013-01-31 04:21    [W:4.043 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site