diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/sch5636.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c index 96a7e68718ca..517118016192 100644 --- a/drivers/hwmon/sch5636.c +++ b/drivers/hwmon/sch5636.c | |||
@@ -402,9 +402,6 @@ static int sch5636_remove(struct platform_device *pdev) | |||
402 | device_remove_file(&pdev->dev, | 402 | device_remove_file(&pdev->dev, |
403 | &sch5636_fan_attr[i].dev_attr); | 403 | &sch5636_fan_attr[i].dev_attr); |
404 | 404 | ||
405 | platform_set_drvdata(pdev, NULL); | ||
406 | kfree(data); | ||
407 | |||
408 | return 0; | 405 | return 0; |
409 | } | 406 | } |
410 | 407 | ||
@@ -414,7 +411,8 @@ static int __devinit sch5636_probe(struct platform_device *pdev) | |||
414 | int i, err, val, revision[2]; | 411 | int i, err, val, revision[2]; |
415 | char id[4]; | 412 | char id[4]; |
416 | 413 | ||
417 | data = kzalloc(sizeof(struct sch5636_data), GFP_KERNEL); | 414 | data = devm_kzalloc(&pdev->dev, sizeof(struct sch5636_data), |
415 | GFP_KERNEL); | ||
418 | if (!data) | 416 | if (!data) |
419 | return -ENOMEM; | 417 | return -ENOMEM; |
420 | 418 | ||