copy_to_user() returns the number of bytes remaining, but we want a negative error code here. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>