Commit ea20670f authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] simplify wdt285 copying.

copy_to_user already does the relevant checking.
parent 65da4ecc
......@@ -136,11 +136,9 @@ static int watchdog_ioctl(struct inode *inode, struct file *file,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment