* [lm-sensors] [PATCH] hwmon: Fix check on unsigned in
@ 2009-10-16 14:48 Roel Kluin
2009-10-17 9:00 ` Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-10-16 14:48 UTC (permalink / raw)
To: lm-sensors
If unsigned the watchdog_trigger() return value will not be
checked correctly.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c
index 2a7a85a..da1b1f9 100644
--- a/drivers/hwmon/fschmd.c
+++ b/drivers/hwmon/fschmd.c
@@ -819,7 +819,7 @@ static int watchdog_release(struct inode *inode, struct file *filp)
static ssize_t watchdog_write(struct file *filp, const char __user *buf,
size_t count, loff_t *offset)
{
- size_t ret;
+ int ret;
struct fschmd_data *data = filp->private_data;
if (count) {
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: Fix check on unsigned in
2009-10-16 14:48 [lm-sensors] [PATCH] hwmon: Fix check on unsigned in Roel Kluin
@ 2009-10-17 9:00 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2009-10-17 9:00 UTC (permalink / raw)
To: lm-sensors
On Fri, 16 Oct 2009 16:48:38 +0200, Roel Kluin wrote:
> If unsigned the watchdog_trigger() return value will not be
> checked correctly.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c
> index 2a7a85a..da1b1f9 100644
> --- a/drivers/hwmon/fschmd.c
> +++ b/drivers/hwmon/fschmd.c
> @@ -819,7 +819,7 @@ static int watchdog_release(struct inode *inode, struct file *filp)
> static ssize_t watchdog_write(struct file *filp, const char __user *buf,
> size_t count, loff_t *offset)
> {
> - size_t ret;
> + int ret;
> struct fschmd_data *data = filp->private_data;
>
> if (count) {
Good catch. Patch applied, thanks.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-17 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 14:48 [lm-sensors] [PATCH] hwmon: Fix check on unsigned in Roel Kluin
2009-10-17 9:00 ` Jean Delvare
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.