projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
215f4cc
)
irqchip/aspeed-i2c-ic: Fix return value check in aspeed_i2c_ic_of_init()
author
Wei Yongjun
<weiyongjun1@huawei.com>
Wed, 11 Oct 2017 10:50:23 +0000
(10:50 +0000)
committer
Marc Zyngier
<marc.zyngier@arm.com>
Thu, 19 Oct 2017 10:22:43 +0000
(11:22 +0100)
In case of error, the function of_iomap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test..
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-aspeed-i2c-ic.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/irqchip/irq-aspeed-i2c-ic.c
b/drivers/irqchip/irq-aspeed-i2c-ic.c
index 815b88dd18f25ad0ff6b818c6cd493d47e556e6c..f20200af0992721d9ae7437ec75066f313545415 100644
(file)
--- a/
drivers/irqchip/irq-aspeed-i2c-ic.c
+++ b/
drivers/irqchip/irq-aspeed-i2c-ic.c
@@
-76,8
+76,8
@@
static int __init aspeed_i2c_ic_of_init(struct device_node *node,
return -ENOMEM;
i2c_ic->base = of_iomap(node, 0);
- if (
IS_ERR(i2c_ic->base)
) {
- ret =
PTR_ERR(i2c_ic->base)
;
+ if (
!i2c_ic->base
) {
+ ret =
-ENOMEM
;
goto err_free_ic;
}