Skip to content

Commit 4baaa49

Browse files
committed
Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe"
commit 99ae341 upstream. This reverts commit 9aa3aa1. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, it was determined that this commit is not needed at all so just revert it. Also, the call to lm80_init_client() was not properly handled, so if error handling is needed in the lm80_probe() function, then it should be done properly, not half-baked like the commit being reverted here did. Cc: Kangjie Lu <kjlu@umn.edu> Fixes: 9aa3aa1 ("hwmon: (lm80) fix a missing check of bus read in lm80 probe") Cc: stable <stable@vger.kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210503115736.2104747-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 03c5d02 commit 4baaa49

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

‎drivers/hwmon/lm80.c‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@ static int lm80_probe(struct i2c_client *client)
596596
struct device *dev = &client->dev;
597597
struct device *hwmon_dev;
598598
struct lm80_data *data;
599-
int rv;
600599

601600
data = devm_kzalloc(dev, sizeof(struct lm80_data), GFP_KERNEL);
602601
if (!data)
@@ -609,14 +608,8 @@ static int lm80_probe(struct i2c_client *client)
609608
lm80_init_client(client);
610609

611610
/* A few vars need to be filled upon startup */
612-
rv = lm80_read_value(client, LM80_REG_FAN_MIN(1));
613-
if (rv < 0)
614-
return rv;
615-
data->fan[f_min][0] = rv;
616-
rv = lm80_read_value(client, LM80_REG_FAN_MIN(2));
617-
if (rv < 0)
618-
return rv;
619-
data->fan[f_min][1] = rv;
611+
data->fan[f_min][0] = lm80_read_value(client, LM80_REG_FAN_MIN(1));
612+
data->fan[f_min][1] = lm80_read_value(client, LM80_REG_FAN_MIN(2));
620613

621614
hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
622615
data, lm80_groups);

0 commit comments

Comments
 (0)