projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eab0998
)
i2c: mux: reg: wrong condition checked for of_address_to_resource return value
author
Lukasz Gemborowski
<
[email protected]
>
Mon, 27 Jun 2016 10:57:47 +0000
(12:57 +0200)
committer
Wolfram Sang
<
[email protected]
>
Tue, 5 Jul 2016 15:33:49 +0000
(
00:33
+0900)
of_address_to_resource return 0 on successful call but
devm_ioremap_resource is called only if it returns non-zero value
Signed-off-by: Lukasz Gemborowski <
[email protected]
>
Reviewed-by: Alexander Sverdlin <
[email protected]
>
Signed-off-by: Wolfram Sang <
[email protected]
>
Cc:
[email protected]
drivers/i2c/muxes/i2c-mux-reg.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/muxes/i2c-mux-reg.c
b/drivers/i2c/muxes/i2c-mux-reg.c
index 26e7c5187a589b473857fd991acdd60a1bdb4609..c6a90b4a9c626dcf4fdf65e51e2f01b5b6ac4968 100644
(file)
--- a/
drivers/i2c/muxes/i2c-mux-reg.c
+++ b/
drivers/i2c/muxes/i2c-mux-reg.c
@@
-145,7
+145,7
@@
static int i2c_mux_reg_probe_dt(struct regmux *mux,
mux->data.idle_in_use = true;
/* map address from "reg" if exists */
- if (of_address_to_resource(np, 0, &res)) {
+ if (of_address_to_resource(np, 0, &res)
== 0
) {
mux->data.reg_size = resource_size(&res);
mux->data.reg = devm_ioremap_resource(&pdev->dev, &res);
if (IS_ERR(mux->data.reg))