ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 9 Nov 2018 10:14:43 +0000 (11:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Nov 2018 03:43:50 +0000 (19:43 -0800)
commit83d0bdc7390b890905634186baaa294475cd6a06
treee23b2f510dd3c51e39efc06c3e74fd43da9b9f17
parentfbb960ac26172215b8dc6635eac13c3a0739d6ed
ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl

If a gettime64 call fails, return the error and avoid copying data back
to user.

Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_chardev.c