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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:45:58 +0000 (19:45 +0100)
commit4d703925ad2592abbeafccfa9e9047f4076247a0
tree568795d274df898e3f7bcc4b879340563a13a452
parentba36191776b9ecf0a2b6d9caf1c65f315d5870c8
ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl

[ Upstream commit 83d0bdc7390b890905634186baaa294475cd6a06 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ptp/ptp_chardev.c