Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315997
b: refs/heads/master
c: 4a8ad25
h: refs/heads/master
i:
  315995: 6a62b87
v: v3
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent 96183b9 commit 53deb47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 705375cc41f2bd63dfffcf4830afff76c63e5681
refs/heads/master: 4a8ad25af56fa55746a97c4f48985154eb82a842
14 changes: 4 additions & 10 deletions trunk/drivers/hwmon/lm93.c
Original file line number Diff line number Diff line change
Expand Up @@ -2738,15 +2738,13 @@ static int lm93_probe(struct i2c_client *client,
} else {
dev_dbg(&client->dev, "detect failed, "
"smbus byte and/or word data not supported!\n");
err = -ENODEV;
goto err_out;
return -ENODEV;
}

data = kzalloc(sizeof(struct lm93_data), GFP_KERNEL);
data = devm_kzalloc(&client->dev, sizeof(struct lm93_data), GFP_KERNEL);
if (!data) {
dev_dbg(&client->dev, "out of memory!\n");
err = -ENOMEM;
goto err_out;
return -ENOMEM;
}
i2c_set_clientdata(client, data);

Expand All @@ -2760,7 +2758,7 @@ static int lm93_probe(struct i2c_client *client,

err = sysfs_create_group(&client->dev.kobj, &lm93_attr_grp);
if (err)
goto err_free;
return err;

/* Register hwmon driver class */
data->hwmon_dev = hwmon_device_register(&client->dev);
Expand All @@ -2770,9 +2768,6 @@ static int lm93_probe(struct i2c_client *client,
err = PTR_ERR(data->hwmon_dev);
dev_err(&client->dev, "error registering hwmon device.\n");
sysfs_remove_group(&client->dev.kobj, &lm93_attr_grp);
err_free:
kfree(data);
err_out:
return err;
}

Expand All @@ -2783,7 +2778,6 @@ static int lm93_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &lm93_attr_grp);

kfree(data);
return 0;
}

Expand Down

0 comments on commit 53deb47

Please sign in to comment.