Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1560712

[PATCH 06/13] MIPS: Lantiq: Fix another request_mem_region() return code check

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH 06/13] MIPS: Lantiq: Fix another request_mem_region() return code check
Date 2017-01-17 16:30 +0100
Message-ID <t0DRV-jr-55@gated-at.bofh.it> (permalink)
References <t0DRU-jr-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hauke already fixed a couple of them, but one instance remains
that checks for a negative integer when it should check
for a NULL pointer:

arch/mips/lantiq/xway/sysctrl.c: In function 'ltq_soc_init':
arch/mips/lantiq/xway/sysctrl.c:473:19: error: ordered comparison of pointer with integer zero [-Werror=extra]

Fixes: 6e807852676a ("MIPS: Lantiq: Fix check for return value of request_mem_region()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/lantiq/xway/sysctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c
index 236193b5210b..ba9f358fa21b 100644
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
@@ -469,8 +469,8 @@ void __init ltq_soc_init(void)
 			panic("Failed to load xbar nodes from devicetree");
 		if (of_address_to_resource(np_pmu, 0, &res_xbar))
 			panic("Failed to get xbar resources");
-		if (request_mem_region(res_xbar.start, resource_size(&res_xbar),
-			res_xbar.name) < 0)
+		if (!request_mem_region(res_xbar.start, resource_size(&res_xbar),
+			res_xbar.name))
 			panic("Failed to get xbar resources");
 
 		ltq_xbar_membase = ioremap_nocache(res_xbar.start,
-- 
2.9.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/13] MIPS: fix modversions Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 03/13] MIPS: 'make -s' should be silent Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 10/13] MIPS: loongson64: fix empty-body warning in dma_alloc Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 06/13] MIPS: Lantiq: Fix another request_mem_region() return code check Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 09/13] MIPS: ralink: remove unused rt*_wdt_reset functions Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 13/13] MIPS: avoid old-style declaration Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 02/13] MIPS: VDSO: avoid duplicate CAC_BASE definition Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100
  [PATCH 12/13] MIPS: ip22: fix ip28 build for modern gcc Arnd Bergmann <arnd@arndb.de> - 2017-01-17 16:30 +0100

csiph-web