lkml.org 
[lkml]   [2013]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/16] ACPI: Separate adding ACPI device objects from probing ACPI drivers
On Fri, Jan 11, 2013 at 09:31:43PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Subject: ACPI / scan: Fix check of device_attach() return value.
>
> Since device_attach() returns 1 on success and 0 on failure,
> the check against its return value in acpi_bus_device_attach()
> should be reveresed. Make it so.

Not sure if it matters but it returns 0 if no device was bound to a driver
and -ENODEV in case of error. If we only want to terminate in case of
error, following might be better.

} else if (device_attach(&device->dev) < 0) {


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