projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da9df93
)
gpio-amd8111: check ioport_map return value
author
Varka Bhadram
<varkabhadram@gmail.com>
Mon, 29 Dec 2014 08:39:01 +0000
(14:09 +0530)
committer
Linus Walleij
<linus.walleij@linaro.org>
Thu, 15 Jan 2015 16:23:21 +0000
(17:23 +0100)
ioport_map() may fail. Its safe to check the return value.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-amd8111.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpio/gpio-amd8111.c
b/drivers/gpio/gpio-amd8111.c
index d3d2d1099f645b75ed39ab5a5ac110d66bad5691..2c4d9ab34accd148c5b38d70c7820f6ae86242ed 100644
(file)
--- a/
drivers/gpio/gpio-amd8111.c
+++ b/
drivers/gpio/gpio-amd8111.c
@@
-213,6
+213,11
@@
found:
goto out;
}
gp.pm = ioport_map(gp.pmbase + PMBASE_OFFSET, PMBASE_SIZE);
+ if (!gp.pm) {
+ dev_err(&pdev->dev, "Couldn't map io port into io memory\n");
+ err = -ENOMEM;
+ goto out;
+ }
gp.pdev = pdev;
gp.chip.dev = &pdev->dev;