Skip to contentSkip to conversation

hwmon: saving negative errors in unsigned

PATCH Applied Dan Carpenter 3 participants 3 messages Mar 11, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: 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.

drivers/hwmon/w83793.c +1 -1
index 9de81a4..612807d 100644
@@ -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,
 	size_t count, loff_t *offset)
 {
-	size_t ret;
+	ssize_t ret;
 	struct w83793_data *data = filp->private_data;
 
 	if (count) {
Acked-by on v1 1/1
#1 lore raw

Ack.

Quoted 18 lines · Dan Carpenter

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

drivers/hwmon/w83793.c +1 -1
index 9de81a4..612807d 100644
@@ -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,
  	size_t count, loff_t *offset)
  {
-	size_t ret;
+	ssize_t ret;
  	struct w83793_data *data = filp->private_data;
 
  	if (count) {
Applied
#2 lore raw
In reply to Dan Carpenter
Quoted 3 lines · Hans de Goede

Ack.

Applied, thanks.

Quoted 19 lines · Dan Carpenter
Quoted 18 lines

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

drivers/hwmon/w83793.c +1 -1
index 9de81a4..612807d 100644
@@ -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,
  	size_t count, loff_t *offset)
  {
-	size_t ret;
+	ssize_t ret;
  	struct w83793_data *data = filp->private_data;
 
  	if (count) {
Signature · 1 line
Jean Delvare