Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316033
b: refs/heads/master
c: 41bf870
h: refs/heads/master
i:
  316031: 27ec30c
v: v3
  • Loading branch information
Sachin Kamat authored and Guenter Roeck committed Jul 22, 2012
1 parent d99069d commit c7d1fa8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: bbc8a569ae91e0951f4b7f8eb33ef1970bf2129c
refs/heads/master: 41bf870e6db130c6e467c70b6da96398066b8be7
7 changes: 2 additions & 5 deletions trunk/drivers/hwmon/s3c-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ static int __devinit s3c_hwmon_probe(struct platform_device *dev)
return -EINVAL;
}

hwmon = kzalloc(sizeof(struct s3c_hwmon), GFP_KERNEL);
hwmon = devm_kzalloc(&dev->dev, sizeof(struct s3c_hwmon), GFP_KERNEL);
if (hwmon == NULL) {
dev_err(&dev->dev, "no memory\n");
return -ENOMEM;
Expand All @@ -303,8 +303,7 @@ static int __devinit s3c_hwmon_probe(struct platform_device *dev)
hwmon->client = s3c_adc_register(dev, NULL, NULL, 0);
if (IS_ERR(hwmon->client)) {
dev_err(&dev->dev, "cannot register adc\n");
ret = PTR_ERR(hwmon->client);
goto err_mem;
return PTR_ERR(hwmon->client);
}

/* add attributes for our adc devices. */
Expand Down Expand Up @@ -363,8 +362,6 @@ static int __devinit s3c_hwmon_probe(struct platform_device *dev)
err_registered:
s3c_adc_release(hwmon->client);

err_mem:
kfree(hwmon);
return ret;
}

Expand Down

0 comments on commit c7d1fa8

Please sign in to comment.