Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 2105e8e00da4 ("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>

authored by

Maximilian Pezzullo and committed by
Jiri Kosina
743677a8 53274394

+2 -1
+2 -1
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
··· 413 413 rc = amd_sfh_hid_client_init(mp2); 414 414 if (rc) { 415 415 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); 417 418 return; 418 419 } 419 420