Skip to content

Commit 20f2e67

Browse files
0lvingroeck
authored andcommitted
hwmon: (nct6775) Additional check for ChipID before ASUS WMI usage
WMI monitoring methods can be changed or removed in new ASUS boards BIOS versions. Such versions return zero instead of a real one as Chip ID. Commit adds additional validation for the result of Chip ID call before enabling access by ASUS WMI methods. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk <pauk.denis@gmail.com> Link: https://lore.kernel.org/r/20211218205206.615865-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent a8d6d49 commit 20f2e67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/nct6775.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5038,7 +5038,7 @@ static int __init sensors_nct6775_init(void)
50385038
board_name);
50395039
if (err >= 0) {
50405040
/* if reading chip id via WMI succeeds, use WMI */
5041-
if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp)) {
5041+
if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp) && tmp) {
50425042
pr_info("Using Asus WMI to access %#x chip.\n", tmp);
50435043
access = access_asuswmi;
50445044
} else {

0 commit comments

Comments
 (0)