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)
committerDoug Ledford <dledford@redhat.com>
Fri, 18 Sep 2015 15:28:47 +0000 (11:28 -0400)
commite1df0068a24ba56673183cc3bd392d8bc301d423
treee607044c89eee498d0718100f2b3dc528299f9aa
parentaadfc3b2042d69a6b4b8d719d4221b988d7f31a5
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>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/diag.c