.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Aspeed 24XX/25XX I2C Interrupt Controller. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2012-2017 ASPEED Technology Inc. |
---|
5 | 6 | * Copyright 2017 IBM Corporation |
---|
6 | 7 | * Copyright 2017 Google, Inc. |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/irq.h> |
---|
.. | .. |
---|
82 | 79 | } |
---|
83 | 80 | |
---|
84 | 81 | i2c_ic->parent_irq = irq_of_parse_and_map(node, 0); |
---|
85 | | - if (i2c_ic->parent_irq < 0) { |
---|
86 | | - ret = i2c_ic->parent_irq; |
---|
| 82 | + if (!i2c_ic->parent_irq) { |
---|
| 83 | + ret = -EINVAL; |
---|
87 | 84 | goto err_iounmap; |
---|
88 | 85 | } |
---|
89 | 86 | |
---|