https://github.com/torvalds/linux
Revision 643fe70e7bcdcc9e2d96952f7fc2bab56385cce5 authored by Stefan Wahren on 28 December 2023, 19:39:03 UTC, committed by Arnd Bergmann on 02 January 2024, 15:45:16 UTC
of_property_match_string returns an int; either an index from 0 or
greater if successful or negative on failure. Even it's very
unlikely that the DT CPU node contains multiple enable-methods
these checks should be fixed.

This patch was inspired by the work of Nick Desaulniers.

Link: https://lore.kernel.org/lkml/20230516-sunxi-v1-1-ac4b9651a8c1@google.com/T/
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20231228193903.9078-2-wahrenst@gmx.net
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 72ad3b7
History
Tip revision: 643fe70e7bcdcc9e2d96952f7fc2bab56385cce5 authored by Stefan Wahren on 28 December 2023, 19:39:03 UTC
ARM: sun9i: smp: fix return code check of of_property_match_string
Tip revision: 643fe70
File Mode Size
Makefile -rw-r--r-- 414 bytes
advise.c -rw-r--r-- 2.3 KB
advise.h -rw-r--r-- 316 bytes
alloc_cache.h -rw-r--r-- 1.4 KB
cancel.c -rw-r--r-- 8.1 KB
cancel.h -rw-r--r-- 721 bytes
epoll.c -rw-r--r-- 1.3 KB
epoll.h -rw-r--r-- 213 bytes
fdinfo.c -rw-r--r-- 6.7 KB
fdinfo.h -rw-r--r-- 100 bytes
filetable.c -rw-r--r-- 4.0 KB
filetable.h -rw-r--r-- 2.2 KB
fs.c -rw-r--r-- 6.8 KB
fs.h -rw-r--r-- 929 bytes
futex.c -rw-r--r-- 9.4 KB
futex.h -rw-r--r-- 1.1 KB
io-wq.c -rw-r--r-- 32.6 KB
io-wq.h -rw-r--r-- 2.1 KB
io_uring.c -rw-r--r-- 123.4 KB
io_uring.h -rw-r--r-- 11.3 KB
kbuf.c -rw-r--r-- 19.0 KB
kbuf.h -rw-r--r-- 4.0 KB
msg_ring.c -rw-r--r-- 7.5 KB
msg_ring.h -rw-r--r-- 226 bytes
net.c -rw-r--r-- 38.1 KB
net.h -rw-r--r-- 2.2 KB
nop.c -rw-r--r-- 498 bytes
nop.h -rw-r--r-- 168 bytes
notif.c -rw-r--r-- 2.2 KB
notif.h -rw-r--r-- 1.3 KB
opdef.c -rw-r--r-- 15.1 KB
opdef.h -rw-r--r-- 1.5 KB
openclose.c -rw-r--r-- 6.2 KB
openclose.h -rw-r--r-- 596 bytes
poll.c -rw-r--r-- 28.5 KB
poll.h -rw-r--r-- 1.1 KB
refs.h -rw-r--r-- 1.2 KB
rsrc.c -rw-r--r-- 29.7 KB
rsrc.h -rw-r--r-- 4.1 KB
rw.c -rw-r--r-- 29.5 KB
rw.h -rw-r--r-- 1.0 KB
slist.h -rw-r--r-- 2.7 KB
splice.c -rw-r--r-- 2.9 KB
splice.h -rw-r--r-- 306 bytes
sqpoll.c -rw-r--r-- 10.2 KB
sqpoll.h -rw-r--r-- 830 bytes
statx.c -rw-r--r-- 1.6 KB
statx.h -rw-r--r-- 217 bytes
sync.c -rw-r--r-- 2.8 KB
sync.h -rw-r--r-- 460 bytes
tctx.c -rw-r--r-- 7.4 KB
tctx.h -rw-r--r-- 992 bytes
timeout.c -rw-r--r-- 18.0 KB
timeout.h -rw-r--r-- 1.2 KB
uring_cmd.c -rw-r--r-- 7.8 KB
uring_cmd.h -rw-r--r-- 231 bytes
waitid.c -rw-r--r-- 9.2 KB
waitid.h -rw-r--r-- 484 bytes
xattr.c -rw-r--r-- 5.6 KB
xattr.h -rw-r--r-- 654 bytes

back to top