summaryrefslogtreecommitdiffstats
path: root/drivers/hid/amd-sfh-hid
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2022-05-12 13:18:48 -0500
committerJiri Kosina <jkosina@suse.cz>2022-05-27 09:07:27 +0200
commite51d8d3ea3d773334d2c047c8d1623dba66f592a (patch)
treebffc905c9b8173f9b867a0c65ee738d9ae8e13d7 /drivers/hid/amd-sfh-hid
parentd6b675687a4ab4dba684716d97c8c6f81bf10905 (diff)
downloadlinux-stable-e51d8d3ea3d773334d2c047c8d1623dba66f592a.tar.gz
linux-stable-e51d8d3ea3d773334d2c047c8d1623dba66f592a.tar.bz2
linux-stable-e51d8d3ea3d773334d2c047c8d1623dba66f592a.zip
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: 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>
Diffstat (limited to 'drivers/hid/amd-sfh-hid')
-rw-r--r--drivers/hid/amd-sfh-hid/amd_sfh_pcie.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
index dadc491bbf6b..1441787a154a 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
@@ -327,7 +327,8 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
rc = amd_sfh_hid_client_init(privdata);
if (rc) {
amd_sfh_clear_intr(privdata);
- dev_err(&pdev->dev, "amd_sfh_hid_client_init failed\n");
+ if (rc != -EOPNOTSUPP)
+ dev_err(&pdev->dev, "amd_sfh_hid_client_init failed\n");
return rc;
}