mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-10 19:35:21 +02:00
m68k: cmpxchg: Fix return value for default case in __arch_xchg()
[ Upstream commit21b9e722ad
] The return value of __invalid_xchg_size() is assigned to tmp instead of the return variable x. Assign it to x instead. Fixes:2501cf768e
("m68k: Fix xchg/cmpxchg to fail to link if given an inappropriate pointer") Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/20240702034116.140234-2-thorsten.blum@toblux.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
13a71384ae
commit
b8cdefdaa5
|
@ -32,7 +32,7 @@ static inline unsigned long __arch_xchg(unsigned long x, volatile void * ptr, in
|
|||
x = tmp;
|
||||
break;
|
||||
default:
|
||||
tmp = __invalid_xchg_size(x, ptr, size);
|
||||
x = __invalid_xchg_size(x, ptr, size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user