i2c: also convert placeholder function to return errno

All i2c_new_device-alike functions return ERR_PTR these days, but this
fallback function was missed.

Fixes: 2dea645ffc ("i2c: acpi: Return error pointers from i2c_acpi_new_device()")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[wsa: changed from 'ENOSYS' to 'ENODEV']
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Wolfram Sang 2020-07-25 16:07:36 +02:00 committed by Wolfram Sang
parent 92ed301919
commit 8be23aec0e
1 changed files with 1 additions and 1 deletions

View File

@ -1001,7 +1001,7 @@ static inline u32 i2c_acpi_find_bus_speed(struct device *dev)
static inline struct i2c_client *i2c_acpi_new_device(struct device *dev, static inline struct i2c_client *i2c_acpi_new_device(struct device *dev,
int index, struct i2c_board_info *info) int index, struct i2c_board_info *info)
{ {
return NULL; return ERR_PTR(-ENODEV);
} }
static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle) static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
{ {