Skip to content

Commit

Permalink
hwmon: (it87) Features mask must be 32 bit wide
Browse files Browse the repository at this point in the history
Coverity reports:

result_independent_of_operands: data->features & (65536UL /* 1UL << 16 */)
is always 0 regardless of the values of its operands. This occurs as the
logical operand of if.

data->features needs to be 32 bit wide since there are more than 16 features.

Fixes: cc18da7 ("hwmon: (it87) Support up to 6 temperature sensors ... ");
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Aug 12, 2016
1 parent 29b4817 commit aa8b187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ struct it87_sio_data {
struct it87_data {
const struct attribute_group *groups[7];
enum chips type;
u16 features;
u32 features;
u8 peci_mask;
u8 old_peci_mask;

Expand Down

0 comments on commit aa8b187

Please sign in to comment.