diff options
Diffstat (limited to 'drivers/ptp/ptp_chardev.c')
-rw-r--r-- | drivers/ptp/ptp_chardev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index a8d03aeb4051..93fa22de5977 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c | |||
@@ -46,7 +46,8 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) | |||
46 | caps.n_ext_ts = ptp->info->n_ext_ts; | 46 | caps.n_ext_ts = ptp->info->n_ext_ts; |
47 | caps.n_per_out = ptp->info->n_per_out; | 47 | caps.n_per_out = ptp->info->n_per_out; |
48 | caps.pps = ptp->info->pps; | 48 | caps.pps = ptp->info->pps; |
49 | err = copy_to_user((void __user *)arg, &caps, sizeof(caps)); | 49 | if (copy_to_user((void __user *)arg, &caps, sizeof(caps))) |
50 | err = -EFAULT; | ||
50 | break; | 51 | break; |
51 | 52 | ||
52 | case PTP_EXTTS_REQUEST: | 53 | case PTP_EXTTS_REQUEST: |