Move get_regs error check from trace_syscall_entering to get_scno

Starting with commit v4.10-25-g8497b62, get_scno() can be called outside
trace_syscall_entering(), so move the get_regs_error check from
trace_syscall_entering() to get_scno().

* syscall.c (trace_syscall_entering): Move get_regs_error check ...
(get_scno): ... here.
diff --git a/syscall.c b/syscall.c
index e42b805..2bc82ca 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1129,6 +1129,9 @@
 int
 get_scno(struct tcb *tcp)
 {
+	if (get_regs_error)
+		return -1;
+
 	long scno = 0;
 
 #if defined(S390) || defined(S390X)
@@ -1752,7 +1755,7 @@
 {
 	int res, scno_good;
 
-	scno_good = res = (get_regs_error ? -1 : get_scno(tcp));
+	scno_good = res = get_scno(tcp);
 	if (res == 0)
 		return res;
 	if (res == 1)