mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-26 17:10:55 +10:00
um: rtc: Avoid shadowing err in uml_rtc_start()
[ Upstream commit4c916e3b22
] Remove the declaration of 'err' inside the 'if (timetravel)' block, as it would otherwise be unavailable outside that block, potentially leading to uml_rtc_start() returning an uninitialized value. Fixes:dde8b58d51
("um: add a pseudo RTC") Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20250708090403.1067440-5-tiwei.bie@linux.dev Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8d83f7143f
commit
863b1c70e7
@ -28,7 +28,7 @@ int uml_rtc_start(bool timetravel)
|
||||
int err;
|
||||
|
||||
if (timetravel) {
|
||||
int err = os_pipe(uml_rtc_irq_fds, 1, 1);
|
||||
err = os_pipe(uml_rtc_irq_fds, 1, 1);
|
||||
if (err)
|
||||
goto fail;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user