hwmon: (nct6775) Clean up a condition
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 5 Sep 2018 07:46:55 +0000 (10:46 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 11 Oct 2018 03:37:13 +0000 (20:37 -0700)
I removed the "dsw_en &&" chunk of the condition because we know that
"dsw_en" is set.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct6775.c

index 78603b7..2b493d0 100644 (file)
@@ -3550,8 +3550,7 @@ nct6775_check_fan_inputs(struct nct6775_data *data)
 
                                if (!fan6pin)
                                        fan6pin = (regval_2a & BIT(4)) &&
-                                         (!dsw_en ||
-                                          (dsw_en && (regval_ed & BIT(4))));
+                                         (!dsw_en || (regval_ed & BIT(4)));
                                if (!pwm6pin)
                                        pwm6pin = (regval_2a & BIT(3)) &&
                                          (regval_ed & BIT(2));