Skip to content

Commit

Permalink
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails
  • Loading branch information
Linus Torvalds committed May 2, 2011
2 parents bc9be57 + c30aa39 commit fa51588
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/hwmon/twl4030-madc-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ static const struct attribute_group twl4030_madc_group = {
static int __devinit twl4030_madc_hwmon_probe(struct platform_device *pdev)
{
int ret;
int status;
struct device *hwmon;

ret = sysfs_create_group(&pdev->dev.kobj, &twl4030_madc_group);
Expand All @@ -107,7 +106,7 @@ static int __devinit twl4030_madc_hwmon_probe(struct platform_device *pdev)
hwmon = hwmon_device_register(&pdev->dev);
if (IS_ERR(hwmon)) {
dev_err(&pdev->dev, "hwmon_device_register failed.\n");
status = PTR_ERR(hwmon);
ret = PTR_ERR(hwmon);
goto err_reg;
}

Expand Down

0 comments on commit fa51588

Please sign in to comment.