Skip to content

Commit 214f525

Browse files
zevweissgroeck
authored andcommitted
hwmon: (nct6775) mask out bank number in nct6775_wmi_read_value()
The first call to nct6775_asuswmi_read() in nct6775_wmi_read_value() had been passing the full bank+register number instead of just the lower 8 bits. It didn't end up actually causing problems because the second argument of that function is a u8 anyway, but it seems preferable to be explicit about it at the call site (and consistent with the rest of the code). Signed-off-by: Zev Weiss <[email protected]> Fixes: 3fbbfc2 ("hwmon: (nct6775) Support access via Asus WMI") Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent dbd3e6e commit 214f525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/nct6775.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ static u16 nct6775_wmi_read_value(struct nct6775_data *data, u16 reg)
15271527

15281528
nct6775_wmi_set_bank(data, reg);
15291529

1530-
err = nct6775_asuswmi_read(data->bank, reg, &tmp);
1530+
err = nct6775_asuswmi_read(data->bank, reg & 0xff, &tmp);
15311531
if (err)
15321532
return 0;
15331533

0 commit comments

Comments
 (0)