Skip to content

Commit 743677a

Browse files
Maximilian PezzulloJiri Kosina
authored andcommitted
HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
When sensor discovery fails on systems without AMD SFH sensors, the code already emits a warning via dev_warn() in amd_sfh_hid_client_init(). The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP return value is redundant and causes unnecessary alarm. Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who have no AMD SFH sensors. Fixes: 2105e8e ("HID: amd_sfh: Improve boot time when SFH is available") Reported-by: Casey Croy <ccroy@bugzilla.kernel.org> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099 Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com> Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent 5327439 commit 743677a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/hid/amd-sfh-hid/amd_sfh_pcie.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work)
413413
rc = amd_sfh_hid_client_init(mp2);
414414
if (rc) {
415415
amd_sfh_clear_intr(mp2);
416-
dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
416+
if (rc != -EOPNOTSUPP)
417+
dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
417418
return;
418419
}
419420

0 commit comments

Comments
 (0)