]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerJiri Kosina <jkosina@suse.cz>
Fri, 27 May 2022 07:07:27 +0000 (09:07 +0200)
commitc0a5c3ff676c60f3343c78e233e0f843047dedfb
treebffc905c9b8173f9b867a0c65ee738d9ae8e13d7
parent2dd38394b79b5e5dd140e6f8c954229f5723681e
HID: amd_sfh: Don't show client init failed as error when discovery fails

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: 432a5bd3fc29 ("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>
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c