mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/hwmon: don't leak device attribute file from pkgtemp_probe()
@ 2010-09-13 10:14 Jan Beulich
  2010-09-24  5:02 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2010-09-13 10:14 UTC (permalink / raw)
  To: khali; +Cc: fenghua.yu, lm-sensors, linux-kernel

While apparently inherited from coretemp source, this particular error
handling cleanup path wasn't copied properly (or perhaps got discarded
intermediately and not re-added properly later).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>

---
 drivers/hwmon/pkgtemp.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.36-rc4/drivers/hwmon/pkgtemp.c	2010-09-13 08:45:03.000000000 +0200
+++ 2.6.36-rc4-x86-pkgtemp-probe-error-path/drivers/hwmon/pkgtemp.c	2010-09-03 17:54:30.000000000 +0200
@@ -224,7 +224,7 @@ static int __devinit pkgtemp_probe(struc
 
 	err = sysfs_create_group(&pdev->dev.kobj, &pkgtemp_group);
 	if (err)
-		goto exit_free;
+		goto exit_dev;
 
 	data->hwmon_dev = hwmon_device_register(&pdev->dev);
 	if (IS_ERR(data->hwmon_dev)) {
@@ -238,6 +238,8 @@ static int __devinit pkgtemp_probe(struc
 
 exit_class:
 	sysfs_remove_group(&pdev->dev.kobj, &pkgtemp_group);
+exit_dev:
+	device_remove_file(&pdev->dev, &sensor_dev_attr_temp1_max.dev_attr);
 exit_free:
 	kfree(data);
 exit:




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-24  5:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 10:14 [PATCH] x86/hwmon: don't leak device attribute file from pkgtemp_probe() Jan Beulich
2010-09-24  5:02 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome