Skip to content

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 <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
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)