Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking

From: Dima Stepanov
Date: Tue May 31 2016 - 22:17:01 EST


> @@ -21,6 +21,9 @@ static inline int do_sys_settimeofday(const struct timespec *tv,
> struct timespec64 ts64;
>
> if (!tv)
> + return do_sys_settimeofday64(NULL, tz);
> +
> + if (tv && !timespec_valid(tv))
> return -EINVAL;

Looks like an extra check for (tv), maybe it will be better to use:
+ if (!timespec_valid(tv))

Regards, Dima.