]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
um: rtc: Avoid shadowing err in uml_rtc_start()
authorTiwei Bie <tiwei.btw@antgroup.com>
Tue, 8 Jul 2025 09:04:03 +0000 (17:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:04:58 +0000 (12:04 +0200)
commit09f75129857e1dceb0e2d407315ee69b2354b600
tree99d2cf2a4e6d52f22157ea02e4515b5364993cec
parent45dca4e735905b1c2288a7c5907a034a64ce8556
um: rtc: Avoid shadowing err in uml_rtc_start()

[ Upstream commit 4c916e3b224a02019b3cc3983a15f32bfd9a22df ]

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: dde8b58d5127 ("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>
arch/um/drivers/rtc_user.c