Skip to content

Commit 8be23ae

Browse files
Wolfram Sangwsakernel
authored andcommitted
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: 2dea645 ("i2c: acpi: Return error pointers from i2c_acpi_new_device()") Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> [wsa: changed from 'ENOSYS' to 'ENODEV'] Signed-off-by: Wolfram Sang <[email protected]>
1 parent 92ed301 commit 8be23ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/i2c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ static inline u32 i2c_acpi_find_bus_speed(struct device *dev)
10011001
static inline struct i2c_client *i2c_acpi_new_device(struct device *dev,
10021002
int index, struct i2c_board_info *info)
10031003
{
1004-
return NULL;
1004+
return ERR_PTR(-ENODEV);
10051005
}
10061006
static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
10071007
{

0 commit comments

Comments
 (0)