]> git.baikalelectronics.ru Git - kernel.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)
commit283041bda21c54a235b9065b813b55368ed95496
treea05a4db2c47e04b0e9309dd9f998fc38b3d35a6e
parentef7787e652574987858b7bb8a9f017f146728750
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: 69ef6ef54af3 ("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