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 <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250711065021.2535362-2-tiwei.bie@linux.dev
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Tiwei Bie 2025-07-11 14:50:19 +08:00 committed by Johannes Berg
parent 8129b9e8e3
commit cba737fa59

View File

@ -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();
}