]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ionic: return -EFAULT if copy_to_user() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 13 Apr 2021 10:47:59 +0000 (13:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Apr 2021 22:08:18 +0000 (15:08 -0700)
commit5871d0c6b8ea805916c3135d0c53b095315bc674
treea05a4db2c47e04b0e9309dd9f998fc38b3d35a6e
parent23ba511722706be1c5e8f2c74e8ec9bd69e57ce2
ionic: return -EFAULT if copy_to_user() fails

The copy_to_user() function returns the number of bytes that it wasn't
able to copy.  We want to return -EFAULT to the user.

Fixes: fee6efce565d ("ionic: add hw timestamp support files")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_phc.c