diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/scmi-hwmon.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c index d421e691318b..09ce30cba54b 100644 --- a/drivers/hwmon/scmi-hwmon.c +++ b/drivers/hwmon/scmi-hwmon.c @@ -202,8 +202,10 @@ static int scmi_hwmon_probe(struct scmi_device *sdev) } } - if (nr_count[hwmon_temp]) - nr_count[hwmon_chip]++, nr_types++; + if (nr_count[hwmon_temp]) { + nr_count[hwmon_chip]++; + nr_types++; + } scmi_hwmon_chan = devm_kcalloc(dev, nr_types, sizeof(*scmi_hwmon_chan), GFP_KERNEL); |