Commit 589f707c authored by Guenter Roeck's avatar Guenter Roeck

hwmon: (lm90) Drop unnecessary else statements

checkpatch rightfully complains that else after return is unnecessary.
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 2f83ab77
...@@ -790,7 +790,6 @@ static inline int temp_from_u8_adt7461(struct lm90_data *data, u8 val) ...@@ -790,7 +790,6 @@ static inline int temp_from_u8_adt7461(struct lm90_data *data, u8 val)
{ {
if (data->flags & LM90_FLAG_ADT7461_EXT) if (data->flags & LM90_FLAG_ADT7461_EXT)
return (val - 64) * 1000; return (val - 64) * 1000;
else
return temp_from_s8(val); return temp_from_s8(val);
} }
...@@ -798,7 +797,6 @@ static inline int temp_from_u16_adt7461(struct lm90_data *data, u16 val) ...@@ -798,7 +797,6 @@ static inline int temp_from_u16_adt7461(struct lm90_data *data, u16 val)
{ {
if (data->flags & LM90_FLAG_ADT7461_EXT) if (data->flags & LM90_FLAG_ADT7461_EXT)
return (val - 0x4000) / 64 * 250; return (val - 0x4000) / 64 * 250;
else
return temp_from_s16(val); return temp_from_s16(val);
} }
...@@ -810,13 +808,12 @@ static u8 temp_to_u8_adt7461(struct lm90_data *data, long val) ...@@ -810,13 +808,12 @@ static u8 temp_to_u8_adt7461(struct lm90_data *data, long val)
if (val >= 191000) if (val >= 191000)
return 0xFF; return 0xFF;
return (val + 500 + 64000) / 1000; return (val + 500 + 64000) / 1000;
} else { }
if (val <= 0) if (val <= 0)
return 0; return 0;
if (val >= 127000) if (val >= 127000)
return 127; return 127;
return (val + 500) / 1000; return (val + 500) / 1000;
}
} }
static u16 temp_to_u16_adt7461(struct lm90_data *data, long val) static u16 temp_to_u16_adt7461(struct lm90_data *data, long val)
...@@ -827,13 +824,12 @@ static u16 temp_to_u16_adt7461(struct lm90_data *data, long val) ...@@ -827,13 +824,12 @@ static u16 temp_to_u16_adt7461(struct lm90_data *data, long val)
if (val >= 191750) if (val >= 191750)
return 0xFFC0; return 0xFFC0;
return (val + 64000 + 125) / 250 * 64; return (val + 64000 + 125) / 250 * 64;
} else { }
if (val <= 0) if (val <= 0)
return 0; return 0;
if (val >= 127750) if (val >= 127750)
return 0x7FC0; return 0x7FC0;
return (val + 125) / 250 * 64; return (val + 125) / 250 * 64;
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment