Skip to content

Commit

Permalink
ACPI / watchdog: Print out error number when device creation fails
Browse files Browse the repository at this point in the history
If the platform device creation fails for whichever reason the driver
prints out something like:

  [    0.978837] ACPI: watchdog: Failed to create platform device

However, that is quite confusing and does not include any information
why it failed. To make it more understandable, reword it like:

  [    0.978837] ACPI: watchdog: Device creation failed: -16

Which tells that we failed to create the watchdog device because some of
the resources were already reserved (-EBUSY).

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Mika Westerberg authored and Rafael J. Wysocki committed Dec 26, 2016
1 parent 7ce7d89 commit c6e2c1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void __init acpi_watchdog_init(void)
pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
resources, nresources);
if (IS_ERR(pdev))
pr_err("Failed to create platform device\n");
pr_err("Device creation failed: %ld\n", PTR_ERR(pdev));

kfree(resources);

Expand Down

0 comments on commit c6e2c1e

Please sign in to comment.