]> 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)
commitf26ecac1d8699dd02e921e4029445dffa202ee3c
treebffc905c9b8173f9b867a0c65ee738d9ae8e13d7
parenta79faf2d3f0ae95f1faadbb1e4e7a699ea15a870
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: 82add33c7c4c ("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