Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 21b9e72

Browse files
tobluxgeertu
authored andcommitted
m68k: cmpxchg: Fix return value for default case in __arch_xchg()
The return value of __invalid_xchg_size() is assigned to tmp instead of the return variable x. Assign it to x instead. Fixes: 2501cf7 ("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>
1 parent 75d3891 commit 21b9e72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/m68k/include/asm/cmpxchg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static inline unsigned long __arch_xchg(unsigned long x, volatile void * ptr, in
3232
x = tmp;
3333
break;
3434
default:
35-
tmp = __invalid_xchg_size(x, ptr, size);
35+
x = __invalid_xchg_size(x, ptr, size);
3636
break;
3737
}
3838

0 commit comments

Comments
 (0)