]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
i2c: acpi: Return error pointers from i2c_acpi_new_device()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 28 Nov 2018 11:45:25 +0000 (13:45 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Dec 2018 19:40:02 +0000 (21:40 +0200)
commit2dea645ffc21f927067e8e35147985887b1a843d
tree1161bd0416a590c8d50d4b2f12b47deb734e32d2
parent1aaeae493aad4d71f75f4129e676fbfcdf8b1422
i2c: acpi: Return error pointers from i2c_acpi_new_device()

The caller would like to know the reason why the i2c_acpi_new_device() fails.
For example, if adapter is not available, it might be in the future and we
would like to re-probe the clients again. But at the same time we would like to
bail out if the error seems unrecoverable, such as invalid argument supplied.
To achieve this, return error pointer in some cases.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-acpi.c