Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326169
b: refs/heads/master
c: 33cd66e
h: refs/heads/master
i:
  326167: 925b012
v: v3
  • Loading branch information
Guenter Roeck committed Sep 24, 2012
1 parent cc0d9f6 commit c9d1eec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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: 59da32d8dfd991fedc0bad197fb6f6a79bb9e712
refs/heads/master: 33cd66e3c8048f03b9cc107b7a21c29cfd700ab7
15 changes: 4 additions & 11 deletions trunk/drivers/hwmon/f71882fg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,8 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
int err, i;
u8 start_reg, reg;

data = kzalloc(sizeof(struct f71882fg_data), GFP_KERNEL);
data = devm_kzalloc(&pdev->dev, sizeof(struct f71882fg_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -2288,13 +2289,11 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
start_reg = f71882fg_read8(data, F71882FG_REG_START);
if (start_reg & 0x04) {
dev_warn(&pdev->dev, "Hardware monitor is powered down\n");
err = -ENODEV;
goto exit_free;
return -ENODEV;
}
if (!(start_reg & 0x03)) {
dev_warn(&pdev->dev, "Hardware monitoring not activated\n");
err = -ENODEV;
goto exit_free;
return -ENODEV;
}

/* Register sysfs interface files */
Expand Down Expand Up @@ -2422,8 +2421,6 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
exit_unregister_sysfs:
f71882fg_remove(pdev); /* Will unregister the sysfs files for us */
return err; /* f71882fg_remove() also frees our data */
exit_free:
kfree(data);
return err;
}

Expand Down Expand Up @@ -2525,10 +2522,6 @@ static int f71882fg_remove(struct platform_device *pdev)
ARRAY_SIZE(fxxxx_auto_pwm_attr[0]) * nr_fans);
}
}

platform_set_drvdata(pdev, NULL);
kfree(data);

return 0;
}

Expand Down

0 comments on commit c9d1eec

Please sign in to comment.