Skip to content

Commit

Permalink
hwmon: (f75375s) Remove unnecessary and confusing initialization
Browse files Browse the repository at this point in the history
f75375_probe calls i2c_get_clientdata to initialize the data pointer,
but there isn't yet any client data to get, and the value is never
used before the variable is assigned a new value seven lines later.

The call doesn't hurt anything and wastes only a couple of cycles.
The reason to fix it is because this module serves as an example to
hackers writing new hwmon drivers, and this part of the example is
confusing.

Signed-off-by: Andrew Klossner <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
  • Loading branch information
Andrew Klossner authored and Jean Delvare committed Mar 12, 2009
1 parent e267d25 commit 51b3e27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
static int f75375_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct f75375_data *data = i2c_get_clientdata(client);
struct f75375_data *data;
struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data;
int err;

Expand Down

0 comments on commit 51b3e27

Please sign in to comment.