patch-2.4.19 linux-2.4.19/drivers/char/wdt285.c

Next file: linux-2.4.19/drivers/char/wdt_pci.c
Previous file: linux-2.4.19/drivers/char/wdt.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/char/wdt285.c linux-2.4.19/drivers/char/wdt285.c
@@ -138,11 +138,9 @@
 		default:
 			return -ENOTTY;
 		case WDIOC_GETSUPPORT:
-			i = verify_area(VERIFY_WRITE, (void*) arg, sizeof(struct watchdog_info));
-			if (i)
-				return i;
-			else
-				return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident));
+			if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+				return -EFAULT;
+			return 0;
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
 			return put_user(0,(int *)arg);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)