Skip to contentSkip to conversation

copy_to_user check for sgiserial

PATCH [email protected] 1 participant 1 message May 15, 2003

lore
Share & tools
lore
#0 lore raw
drivers/sgi/char/sgiserial.c +1 -1
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/sgi/char/sgiserial.c linux-2.5/drivers/sgi/char/sgiserial.c
@@ -1232,7 +1233,7 @@ static int get_serial_info(struct sgi_se
 	tmp.close_delay = info->close_delay;
 	tmp.closing_wait = info->closing_wait;
 	tmp.custom_divisor = info->custom_divisor;
-	return copy_to_user(retinfo,&tmp,sizeof(*retinfo));
+	return copy_to_user(retinfo,&tmp,sizeof(*retinfo)) ? -EFAULT : 0;
 }
 
 static int set_serial_info(struct sgi_serial * info,