HID: amd_sfh: Don't show client init failed as error when discovery fails
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 12 May 2022 18:18:48 +0000 (13:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:38 +0000 (14:23 +0200)
commit36c27d813e75eeff28041430bcff8dc9d1262279
treeb89d88c9622aaf028f2fd51a55e2f14434e0fa25
parentc36369f7db87e7d0a5c46700355c313df88263e7
HID: amd_sfh: Don't show client init failed as error when discovery fails

[ Upstream commit e51d8d3ea3d773334d2c047c8d1623dba66f592a ]

When sensor discovery fails, this means that the system doesn't have
any sensors connected and a user should only be notified at most one time.
A message is already displayed at WARN level of "failed to discover,
sensors not enabled".  It's pointless to show that the client init failed
at ERR level for the same condition.

Check the return code and don't display this message in those conditions.

Fixes: b5d7f43e97da ("HID: amd_sfh: Add support for sensor discovery")
Reported-by: David Chang <David.Chang@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c