hwmon: (fschmd) Fix check on unsigned in watchdog_write()
authorRoel Kluin <roel.kluin@gmail.com>
Sat, 24 Oct 2009 11:28:45 +0000 (13:28 +0200)
committerJean Delvare <khali@linux-fr.org>
Sat, 24 Oct 2009 11:28:45 +0000 (13:28 +0200)
If unsigned the watchdog_trigger() return value will not be
checked correctly.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/fschmd.c

index 2a7a85a6dc360e9615725fc7be5c25b0f845799c..da1b1f9488afc335c60b1833ee3fb7d89d3b832d 100644 (file)
@@ -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) {