treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm64 / kernel / vdso32 / vgettimeofday.c
blob54fc1c2ce93f61c1106b2909099651828ff6fa8c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * ARM64 compat userspace implementations of gettimeofday() and similar.
5 * Copyright (C) 2018 ARM Limited
7 */
8 #include <linux/time.h>
9 #include <linux/types.h>
11 int __vdso_clock_gettime(clockid_t clock,
12 struct old_timespec32 *ts)
14 /* The checks below are required for ABI consistency with arm */
15 if ((u32)ts >= TASK_SIZE_32)
16 return -EFAULT;
18 return __cvdso_clock_gettime32(clock, ts);
21 int __vdso_clock_gettime64(clockid_t clock,
22 struct __kernel_timespec *ts)
24 /* The checks below are required for ABI consistency with arm */
25 if ((u32)ts >= TASK_SIZE_32)
26 return -EFAULT;
28 return __cvdso_clock_gettime(clock, ts);
31 int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
32 struct timezone *tz)
34 return __cvdso_gettimeofday(tv, tz);
37 int __vdso_clock_getres(clockid_t clock_id,
38 struct old_timespec32 *res)
40 /* The checks below are required for ABI consistency with arm */
41 if ((u32)res >= TASK_SIZE_32)
42 return -EFAULT;
44 return __cvdso_clock_getres_time32(clock_id, res);
47 /* Avoid unresolved references emitted by GCC */
49 void __aeabi_unwind_cpp_pr0(void)
53 void __aeabi_unwind_cpp_pr1(void)
57 void __aeabi_unwind_cpp_pr2(void)