Browse Source

hwmon: (w83793) Saving negative errors in unsigned

"ret" is used to store the return value for watchdog_trigger() and it
should be signed for the error handling to work.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Dan Carpenter 15 năm trước cách đây
mục cha
commit
3f7cd7ea93
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/hwmon/w83793.c

+ 1 - 1
drivers/hwmon/w83793.c

@@ -1294,7 +1294,7 @@ static int watchdog_close(struct inode *inode, struct file *filp)
 static ssize_t watchdog_write(struct file *filp, const char __user *buf,
 static ssize_t watchdog_write(struct file *filp, const char __user *buf,
 	size_t count, loff_t *offset)
 	size_t count, loff_t *offset)
 {
 {
-	size_t ret;
+	ssize_t ret;
 	struct w83793_data *data = filp->private_data;
 	struct w83793_data *data = filp->private_data;
 
 
 	if (count) {
 	if (count) {