linux: Check for copyout errors in ioctl handlers
In preparation for annotating copyin() and friends with
__result_use_check.
Reviewed by: dchagin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43199
(cherry picked from commit b9924c202fc34004d4164cdc50f88d8fcef26279)