diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-01-17 10:18:42 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-24 20:51:10 -0500 |
commit | 6d2700a95f7387f389d320ef87f33b7661fc1af5 (patch) | |
tree | ae3ad75974599c3b16827332a887b59469312591 /arch/mips/ralink/irq.c | |
parent | d92240d12a9c010e0094bbc9280aae4a6be9a2d5 (diff) |
MIPS: ralink: Fix request_mem_region error handling
request_mem_region returns a NULL pointer on error, comparing it
against a number results in a warning:
arch/mips/ralink/of.c: In function 'plat_of_remap_node':
arch/mips/ralink/of.c:45:15: error: ordered comparison of pointer with integer zero [-Werror=extra]
arch/mips/ralink/irq.c: In function 'intc_of_init':
arch/mips/ralink/irq.c:167:15: error: ordered comparison of pointer with integer zero [-Werror=extra]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: John Crispin <john@phrozen.org>
Cc: Tobias Wolf <dev-NTEO@vplace.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15045/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ralink/irq.c')
-rw-r--r-- | arch/mips/ralink/irq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/ralink/irq.c b/arch/mips/ralink/irq.c index 4911c1445f1a..9b478c95aaf5 100644 --- a/arch/mips/ralink/irq.c +++ b/arch/mips/ralink/irq.c | |||
@@ -163,8 +163,8 @@ static int __init intc_of_init(struct device_node *node, | |||
163 | if (of_address_to_resource(node, 0, &res)) | 163 | if (of_address_to_resource(node, 0, &res)) |
164 | panic("Failed to get intc memory range"); | 164 | panic("Failed to get intc memory range"); |
165 | 165 | ||
166 | if (request_mem_region(res.start, resource_size(&res), | 166 | if (!request_mem_region(res.start, resource_size(&res), |
167 | res.name) < 0) | 167 | res.name)) |
168 | pr_err("Failed to request intc memory"); | 168 | pr_err("Failed to request intc memory"); |
169 | 169 | ||
170 | rt_intc_membase = ioremap_nocache(res.start, | 170 | rt_intc_membase = ioremap_nocache(res.start, |