All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Prendel <andre.prendel@gmx.de>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] k8temp: Unset driver data in exit_remove
Date: Wed, 06 May 2009 07:17:41 +0000	[thread overview]
Message-ID: <20090506071741.GA4386@ubuntu> (raw)

Hi Jean, Rudolf,

after infiltrating the sensors user space part, I think it's time to
dive into kernel space. So I took a look at some of the sensor drivers
to get an understanding. Unfortunately I couldn't find a bug to fix,
so I had to do something else :)

I don't know whether this patch is worth to be applied, but I have to
start somewhere.

I'm very interested in doing more kernel stuff. So if you have some
work to do, please tell me about it.

Thanks
Andre
---

At the exit_free label in k8temp_probe() the driver data is set to
NULL. This field isn't set before. So this should be done in
exit_remove.

Signed-off-by: Andre Prendel <andre.prendel@gmx.de>
---

--- linux-2.6.orig/drivers/hwmon/k8temp.c	2009-05-05 21:31:44.000000000 +0200
+++ linux-2.6/drivers/hwmon/k8temp.c	2009-05-05 21:35:03.000000000 +0200
@@ -281,8 +281,8 @@
 	device_remove_file(&pdev->dev,
 			   &sensor_dev_attr_temp4_input.dev_attr);
 	device_remove_file(&pdev->dev, &dev_attr_name);
-exit_free:
 	dev_set_drvdata(&pdev->dev, NULL);
+exit_free:
 	kfree(data);
 exit:
 	return err;


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

             reply	other threads:[~2009-05-06  7:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06  7:17 Andre Prendel [this message]
2009-05-06  7:36 ` [lm-sensors] [PATCH] k8temp: Unset driver data in exit_remove Jean Delvare
2009-05-06  7:54 ` Andre Prendel
2009-05-06  7:54 ` Hans de Goede
2009-05-06  8:59 ` Andre Prendel
2009-05-06 14:03 ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090506071741.GA4386@ubuntu \
    --to=andre.prendel@gmx.de \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.