From: Todd Poynor <toddpoynor@google.com>
To: Keerthy <j-keerthy@ti.com>
Cc: linux-omap@vger.kernel.org, Jean Delvare <khali@linux-fr.org>,
Guenter Roeck <guenter.roeck@ericsson.com>,
lm-sensors@lm-sensors.org
Subject: Re: [PATCH 6/6 V3] hwmon: OMAP4: On die temperature sensor driver
Date: Thu, 25 Aug 2011 00:24:19 -0700 [thread overview]
Message-ID: <20110825072419.GA12528@google.com> (raw)
In-Reply-To: <1314196632-8207-7-git-send-email-j-keerthy@ti.com>
On Wed, Aug 24, 2011 at 08:07:12PM +0530, Keerthy wrote:
...
> + temp_sensor->phy_base = ioremap(mem->start, resource_size(mem));
Check NULL return.
temp_sensor->phy_base is never iounmapped in error paths or _remove
function.
...
> +static int __devexit omap_temp_sensor_remove(struct platform_device *pdev)
> +{
> + struct omap_temp_sensor *temp_sensor = platform_get_drvdata(pdev);
> +
> + hwmon_device_unregister(&pdev->dev);
> + kobject_uevent(&temp_sensor->hwmon_dev->kobj, KOBJ_REMOVE);
> + sysfs_remove_group(&temp_sensor->hwmon_dev->kobj,
> + &omap_temp_sensor_group);
> + omap_temp_sensor_clk_disable(temp_sensor);
> + free_irq(temp_sensor->irq, temp_sensor);
free_irq before omap_temp_sensor_clk_disable, to avoid ISR attempting
to access hardware while unclocked.
> + clk_put(temp_sensor->clock);
> + dev_set_drvdata(&pdev->dev, NULL);
> + mutex_destroy(&temp_sensor->sensor_mutex);
> + kfree(temp_sensor);
> +
> + return 0;
> +}
Todd
next prev parent reply other threads:[~2011-08-25 7:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 14:37 [PATCH 0/6 V3] OMAP4: Temperature sensor driver Keerthy
2011-08-24 14:37 ` [PATCH 1/6 V3] OMAP4: Clock: Associate clocks for OMAP temperature sensor Keerthy
2011-08-24 14:37 ` [PATCH 2/6 V3] OMAP4: Adding the temperature sensor register set bit fields Keerthy
2011-08-24 14:37 ` [PATCH 3/6 V3] OMAP4460: Temperature sensor data Keerthy
2011-08-24 14:37 ` [PATCH 4/6 V3] OMAP4: Hwmod: OMAP temperature sensor Keerthy
2011-08-24 14:37 ` [PATCH 5/6 V3] OMAP4: Temperature sensor device support Keerthy
2011-08-24 14:37 ` [PATCH 6/6 V3] hwmon: OMAP4: On die temperature sensor driver Keerthy
2011-08-24 16:36 ` Janakiram Sistla
2011-08-24 18:18 ` J, KEERTHY
2011-08-24 19:52 ` Janakiram Sistla
2011-08-25 0:39 ` J, KEERTHY
2011-08-25 7:24 ` Todd Poynor [this message]
2011-08-25 15:54 ` Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2011-08-24 17:16 Guenter Roeck
2011-08-25 10:30 ` J, KEERTHY
2011-08-25 14:06 ` Guenter Roeck
2011-08-25 16:04 ` J, KEERTHY
2011-08-25 16:19 ` Guenter Roeck
2011-08-25 16:39 ` J, KEERTHY
2011-08-25 16:49 ` Guenter Roeck
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=20110825072419.GA12528@google.com \
--to=toddpoynor@google.com \
--cc=guenter.roeck@ericsson.com \
--cc=j-keerthy@ti.com \
--cc=khali@linux-fr.org \
--cc=linux-omap@vger.kernel.org \
--cc=lm-sensors@lm-sensors.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox