From: Tiwei Bie Date: Fri, 11 Jul 2025 06:50:19 +0000 (+0800) Subject: um: Use err consistently in userspace() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cba737fa595f076f4b11df045d74bf6dfbc8db2f;p=thirdparty%2Flinux.git um: Use err consistently in userspace() Avoid declaring a new variable 'ret' inside the 'if (using_seccomp)' block, as the existing 'err' variable declared at the top of the function already serves the same purpose. Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250711065021.2535362-2-tiwei.bie@linux.dev Signed-off-by: Johannes Berg --- diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index d3dd4fb559cfd..79541574f70d5 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -592,12 +592,11 @@ void userspace(struct uml_pt_regs *regs) if (using_seccomp) { struct mm_id *mm_id = current_mm_id(); struct stub_data *proc_data = (void *) mm_id->stack; - int ret; - ret = set_stub_state(regs, proc_data, singlestepping()); - if (ret) { + err = set_stub_state(regs, proc_data, singlestepping()); + if (err) { printk(UM_KERN_ERR "%s - failed to set regs: %d", - __func__, ret); + __func__, err); fatal_sigsegv(); } @@ -623,10 +622,10 @@ void userspace(struct uml_pt_regs *regs) mm_id->syscall_data_len = 0; mm_id->syscall_fd_num = 0; - ret = get_stub_state(regs, proc_data, NULL); - if (ret) { + err = get_stub_state(regs, proc_data, NULL); + if (err) { printk(UM_KERN_ERR "%s - failed to get regs: %d", - __func__, ret); + __func__, err); fatal_sigsegv(); }