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:
cbfb3ea
)
gpio: x-gene: fix devm_ioremap_resource() check
author
Vladimir Zapolskiy
<vz@mleia.com>
Sun, 29 Mar 2015 02:37:20 +0000
(
05:37
+0300)
committer
Linus Walleij
<linus.walleij@linaro.org>
Wed, 8 Apr 2015 07:53:57 +0000
(09:53 +0200)
devm_ioremap_resource() returns IOMEM_ERR_PTR() and it never
returns NULL, fix the check to prevent access to invalid
virtual address.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-xgene-sb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpio/gpio-xgene-sb.c
b/drivers/gpio/gpio-xgene-sb.c
index b6a15c39293e2ad0e7ff1b2bcb323d4d66407085..fb9d29a5d584c0cf7793ab517f13c3383393405f 100644
(file)
--- a/
drivers/gpio/gpio-xgene-sb.c
+++ b/
drivers/gpio/gpio-xgene-sb.c
@@
-93,7
+93,7
@@
static int xgene_gpio_sb_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
regs = devm_ioremap_resource(&pdev->dev, res);
- if (
!regs
)
+ if (
IS_ERR(regs)
)
return PTR_ERR(regs);
ret = bgpio_init(&priv->bgc, &pdev->dev, 4,