Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cf0a91e authored by Jean Delvare's avatar Jean Delvare
Browse files

hwmon: Avoid initializing the same field twice



All hwmon drivers allocate their data structure with some form of
kzalloc, so setting data fields to zero explicitly is a waste of time.

Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 5b581575
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1115,7 +1115,6 @@ asc7621_probe(struct i2c_client *client, const struct i2c_device_id *id)
		return -ENOMEM;

	i2c_set_clientdata(client, data);
	data->valid = 0;
	mutex_init(&data->update_lock);

	/* Initialize the asc7621 chip */
+0 −2
Original line number Diff line number Diff line
@@ -353,8 +353,6 @@ static int atxp1_probe(struct i2c_client *new_client,
	data->vrm = vid_which_vrm();

	i2c_set_clientdata(new_client, data);
	data->valid = 0;

	mutex_init(&data->update_lock);

	/* Register sysfs hooks */
+0 −1
Original line number Diff line number Diff line
@@ -348,7 +348,6 @@ static int lm77_probe(struct i2c_client *client, const struct i2c_device_id *id)
		return -ENOMEM;

	i2c_set_clientdata(client, data);
	data->valid = 0;
	mutex_init(&data->update_lock);

	/* Initialize the LM77 chip */
+0 −1
Original line number Diff line number Diff line
@@ -349,7 +349,6 @@ static int lm83_probe(struct i2c_client *new_client,
		return -ENOMEM;

	i2c_set_clientdata(new_client, data);
	data->valid = 0;
	mutex_init(&data->update_lock);

	/*
+0 −1
Original line number Diff line number Diff line
@@ -903,7 +903,6 @@ static int lm87_probe(struct i2c_client *client, const struct i2c_device_id *id)
		return -ENOMEM;

	i2c_set_clientdata(client, data);
	data->valid = 0;
	mutex_init(&data->update_lock);

	/* Initialize the LM87 chip */
Loading