summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2024-12-29 17:46:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-09 13:33:42 +0100
commita0c12973edf75033b15023c8e0ff94002b87fb8b (patch)
treeba79698e35dba5a8c306114b49007490a4ceb676 /include/linux
parent3257813a3ae7462ac5cde04e120806f0c0776850 (diff)
downloadlinux-a0c12973edf75033b15023c8e0ff94002b87fb8b.tar.gz
linux-a0c12973edf75033b15023c8e0ff94002b87fb8b.tar.bz2
linux-a0c12973edf75033b15023c8e0ff94002b87fb8b.zip
net: wwan: iosm: Properly check for valid exec stage in ipc_mmio_init()
[ Upstream commit a7af435df0e04cfb4a4004136d597c42639a2ae7 ] ipc_mmio_init() used the post-decrement operator in its loop continuing condition of "retries" counter being "> 0", which meant that when this condition caused loop exit "retries" counter reached -1. But the later valid exec stage failure check only tests for "retries" counter being exactly zero, so it didn't trigger in this case (but would wrongly trigger if the code reaches a valid exec stage in the very last loop iteration). Fix this by using the pre-decrement operator instead, so the loop counter is exactly zero on valid exec stage failure. Fixes: dc0514f5d828 ("net: iosm: mmio scratchpad") Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Link: https://patch.msgid.link/8b19125a825f9dcdd81c667c1e5c48ba28d505a6.1735490770.git.mail@maciej.szmigiero.name Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions