Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315970
b: refs/heads/master
c: ed2e073
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent f0ed8c1 commit 70a550e
Show file tree
Hide file tree
Showing 2 changed files with 3 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: b07405fbc38f2e7f2eef2f38fa724a7510ae14aa
refs/heads/master: ed2e073b13c72de422afa75f7c9f4869ec3018cd
12 changes: 2 additions & 10 deletions trunk/drivers/hwmon/mc13783-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static int __init mc13783_adc_probe(struct platform_device *pdev)
const struct platform_device_id *id = platform_get_device_id(pdev);
char *dash;

priv = kzalloc(sizeof(*priv), GFP_KERNEL);
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;

Expand All @@ -194,7 +194,7 @@ static int __init mc13783_adc_probe(struct platform_device *pdev)
/* Register sysfs hooks */
ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_base);
if (ret)
goto out_err_create_base;
return ret;

if (id->driver_data & MC13783_ADC_16CHANS) {
ret = sysfs_create_group(&pdev->dev.kobj,
Expand Down Expand Up @@ -230,11 +230,6 @@ static int __init mc13783_adc_probe(struct platform_device *pdev)
out_err_create_16chans:

sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base);
out_err_create_base:

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

return ret;
}

Expand All @@ -253,9 +248,6 @@ static int __devexit mc13783_adc_remove(struct platform_device *pdev)

sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base);

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

return 0;
}

Expand Down

0 comments on commit 70a550e

Please sign in to comment.