linux/arch
Shiji Yang 3dcc20eb9a MIPS: lantiq: falcon: sysctrl: fix request memory check logic
[ Upstream commit 9c9a7ff988 ]

request_mem_region() will return NULL instead of error code
when the memory request fails. Therefore, we should check if
the return value is non-zero instead of less than zero. In
this way, this patch also fixes the build warnings:

arch/mips/lantiq/falcon/sysctrl.c:214:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
  214 |                                 res_status.name) < 0) ||
      |                                                  ^
arch/mips/lantiq/falcon/sysctrl.c:216:47: error: ordered comparison of pointer with integer zero [-Werror=extra]
  216 |                                 res_ebu.name) < 0) ||
      |                                               ^
arch/mips/lantiq/falcon/sysctrl.c:219:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
  219 |                                 res_sys[0].name) < 0) ||
      |                                                  ^
arch/mips/lantiq/falcon/sysctrl.c:222:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
  222 |                                 res_sys[1].name) < 0) ||
      |                                                  ^
arch/mips/lantiq/falcon/sysctrl.c:225:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
  225 |                                 res_sys[2].name) < 0))
      |

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-28 16:26:00 +02:00
..
alpha alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support 2025-03-28 21:58:51 +01:00
arc ARC: build: Try to guess GCC variant of cross compiler 2025-01-09 13:30:05 +01:00
arm ARM: tegra: Use I/O memcpy to write to IRAM 2025-08-28 16:25:53 +02:00
arm64 arm64: Mark kernel as tainted on SAE and SError panic 2025-08-28 16:25:55 +02:00
csky mm: remove kern_addr_valid() completely 2024-11-08 16:26:39 +01:00
hexagon hexagon: Fix unbalanced spinlock in die() 2025-02-21 13:49:25 +01:00
ia64 mm: remove kern_addr_valid() completely 2024-11-08 16:26:39 +01:00
loongarch LoongArch: BPF: Fix jump offset calculation in tailcall 2025-08-28 16:25:49 +02:00
m68k m68k: Don't unregister boot console needlessly 2025-08-15 12:04:57 +02:00
microblaze microblaze: Export xmb_manager functions 2024-12-14 19:53:20 +01:00
mips MIPS: lantiq: falcon: sysctrl: fix request memory check logic 2025-08-28 16:26:00 +02:00
nios2 mm: remove kern_addr_valid() completely 2024-11-08 16:26:39 +01:00
openrisc mm: remove kern_addr_valid() completely 2024-11-08 16:26:39 +01:00
parisc parisc: fix building with gcc-15 2025-06-27 11:07:29 +01:00
powerpc powerpc: floppy: Add missing checks after DMA map 2025-08-28 16:25:57 +02:00
riscv RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs 2025-06-27 11:07:41 +01:00
s390 s390/stp: Remove udelay from stp_sync_clock() 2025-08-28 16:25:56 +02:00
sh sh: Do not use hyphen in exported variable name 2025-08-15 12:05:04 +02:00
sparc sparc/mm: disable preemption in lazy mmu mode 2025-04-25 10:43:42 +02:00
um um: Re-evaluate thread flags repeatedly 2025-08-28 16:25:56 +02:00
x86 x86/bugs: Avoid warning when overriding return thunk 2025-08-28 16:25:54 +02:00
xtensa mm: remove kern_addr_valid() completely 2024-11-08 16:26:39 +01:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" 2024-06-27 13:46:24 +02:00