From b414caa40e07ddc0c0dc03d30c41c038ecd1bf52 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Mon, 12 Mar 2012 08:33:10 -0700 Subject: [PATCH] --- yaml --- r: 288487 b: refs/heads/master c: 32260d94408c553dca4ce54104edf79941a27536 h: refs/heads/master i: 288485: 10fd828d4d9a2cb2df9c38125845fe8c0be368bc 288483: bfc0165b3dc37fc65c54b09db5aa0796986bcf98 288479: 1b05cd90cb4574f6c3e3ec4a0845d2bc04b48f8d v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/w83627ehf.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 102c2de1c2c2..7cb3e9767a1c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33fa9b620409edfc71aa6cf01a51f990fbe46ab8 +refs/heads/master: 32260d94408c553dca4ce54104edf79941a27536 diff --git a/trunk/drivers/hwmon/w83627ehf.c b/trunk/drivers/hwmon/w83627ehf.c index dbcdef69f8f3..3e1fa52d57bf 100644 --- a/trunk/drivers/hwmon/w83627ehf.c +++ b/trunk/drivers/hwmon/w83627ehf.c @@ -2004,7 +2004,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) goto exit; } - data = kzalloc(sizeof(struct w83627ehf_data), GFP_KERNEL); + data = devm_kzalloc(&pdev->dev, sizeof(struct w83627ehf_data), + GFP_KERNEL); if (!data) { err = -ENOMEM; goto exit_release; @@ -2493,9 +2494,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) exit_remove: w83627ehf_device_remove_files(dev); - kfree(data); - platform_set_drvdata(pdev, NULL); exit_release: + platform_set_drvdata(pdev, NULL); release_region(res->start, IOREGION_LENGTH); exit: return err; @@ -2509,7 +2509,6 @@ static int __devexit w83627ehf_remove(struct platform_device *pdev) w83627ehf_device_remove_files(&pdev->dev); release_region(data->addr, IOREGION_LENGTH); platform_set_drvdata(pdev, NULL); - kfree(data); return 0; }