diff options
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_phc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c index 177dbf89affd..a87c87e86aef 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c @@ -225,7 +225,9 @@ int ionic_lif_hwstamp_get(struct ionic_lif *lif, struct ifreq *ifr) memcpy(&config, &lif->phc->ts_config, sizeof(config)); mutex_unlock(&lif->phc->config_lock); - return copy_to_user(ifr->ifr_data, &config, sizeof(config)); + if (copy_to_user(ifr->ifr_data, &config, sizeof(config))) + return -EFAULT; + return 0; } static u64 ionic_hwstamp_read(struct ionic *ionic, |