summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2020-09-03 21:14:49 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2020-09-03 21:14:49 +0000
commita9364a050b42c82de635a00e086b94214f305454 (patch)
treeb2a6b894380debb206c586c36bb57290c6597cb6 /drivers/hwmon
parentc874333fa0bea09c0cb6dc5466a48f8bb4499fac (diff)
parent933cf1c2c075f44c7b6837b6201e0db2d488835a (diff)
Merge tag 'v5.4.62' into 5.4-2.1.x-imx
This is the 5.4.62 stable release Conflicts (manual resolve): - drivers/usb/dwc3/gadget.c Fix a hickup during applying of the patch 4bc5d90a7dce1 from upstream, that version is taken over the NXP one. Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/nct7904.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c
index dfb122b5e1b7..b812b199e5e5 100644
--- a/drivers/hwmon/nct7904.c
+++ b/drivers/hwmon/nct7904.c
@@ -197,7 +197,7 @@ static int nct7904_read_fan(struct device *dev, u32 attr, int channel,
if (ret < 0)
return ret;
cnt = ((ret & 0xff00) >> 3) | (ret & 0x1f);
- if (cnt == 0x1fff)
+ if (cnt == 0 || cnt == 0x1fff)
rpm = 0;
else
rpm = 1350000 / cnt;
@@ -209,7 +209,7 @@ static int nct7904_read_fan(struct device *dev, u32 attr, int channel,
if (ret < 0)
return ret;
cnt = ((ret & 0xff00) >> 3) | (ret & 0x1f);
- if (cnt == 0x1fff)
+ if (cnt == 0 || cnt == 0x1fff)
rpm = 0;
else
rpm = 1350000 / cnt;