hwmon: (nct6775) Check array index when accessing temp_offset
smatch complains about a potential out-of-bounds access to the
temp_offset array. That doesn't happen in practice, but it doesn't
hurt to add an explicit check either. This prevents potential problems
in the future (for example if the number of 'fixed' temperature
sensors is increased to add support for another chip).
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Showing
Please register or sign in to comment