i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node
authorHans de Goede <hdegoede@redhat.com>
Wed, 21 Nov 2018 09:19:55 +0000 (10:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:13:17 +0000 (14:13 +0100)
commitc39910b57c7f557d304f50775eab28b6c892a7fd
treea0187c1edcc7af972e5c50e5252021f48c741215
parent4bdfff5c4f913c50a419b1e28e5893ebc04a09ff
i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node

[ Upstream commit 0544ee4b1ad574aec3b6379af5f5cdee42840971 ]

Some AMD based HP laptops have a SMB0001 ACPI device node which does not
define any methods.

This leads to the following error in dmesg:

[    5.222731] cmi: probe of SMB0001:00 failed with error -5

This commit makes acpi_smbus_cmi_add() return -ENODEV instead in this case
silencing the error. In case of a failure of the i2c_add_adapter() call
this commit now propagates the error from that call instead of -EIO.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-scmi.c