diff options
author | Dan Carpenter <[email protected]> | 2013-08-23 12:38:32 +0300 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2013-11-17 19:36:59 +0100 |
commit | a20a99fbb88ac58c2e118e8759967d1cd7355322 (patch) | |
tree | fad8c2ce78aa51b679d0ac0a561d3216d92eef31 /lib/mpi/mpi-cmp.c | |
parent | cfff96e69f05176afd0e58d3a8c853a6d68ce544 (diff) |
watchdog: ts72xx_wdt: cleanup return codes in ioctl
There seems to be some confusion here which functions return positive
numbers and which return negative error codes.
copy_to_user() returns the number of bytes remaining to be copied but we
want to return -EFAULT.
The rest is just clean up. get_user() actually returns zero on success
and -EFAULT on error so we can preserve the error code. The
timeout_to_regval() function returns -EINVAL on failure, but we can
propogate that back instead of hardcoding -EINVAL ourselves.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
--
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions