IB/hfi1: fix copy_to/from_user() error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Sep 2015 10:35:25 +0000 (13:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Sep 2015 13:40:57 +0000 (06:40 -0700)
commit978fdc22bae06ea7422d7660ac78ed1c1c9c3e2a
treec939c9df2eec4ea6c1d908c31cfd5f70292982e3
parentadad44d1322c6657a96fa1681ded9bb0c3bd56f0
IB/hfi1: fix copy_to/from_user() error handling

copy_to/from_user() returns the number of bytes which we were not able
to copy.  It doesn't return an error code.

Also a couple places had a printk() on error and I removed that because
people can take advantage of it to fill /var/log/messages with spam.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mike Marciniszyn <infinipath@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c