OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71b96c3
)
pinctrl: samsung: Handle memory allocation failure during wakeup banks init
author
Krzysztof Kozlowski
<krzk@kernel.org>
Tue, 23 May 2017 18:41:40 +0000
(20:41 +0200)
committer
Krzysztof Kozlowski
<krzk@kernel.org>
Wed, 7 Jun 2017 18:40:48 +0000
(20:40 +0200)
Check if kmemdup failed during wakeup banks initialization. Otherwise
NULL pointer would be stored under "irq_chip" member of bank and later
dereferenced in interrupt handler.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/pinctrl/samsung/pinctrl-exynos.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/samsung/pinctrl-exynos.c
b/drivers/pinctrl/samsung/pinctrl-exynos.c
index
727462c
..
96068b4
100644
(file)
--- a/
drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/
drivers/pinctrl/samsung/pinctrl-exynos.c
@@
-479,6
+479,8
@@
int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
if (match) {
irq_chip = kmemdup(match->data,
sizeof(*irq_chip), GFP_KERNEL);
+ if (!irq_chip)
+ return -ENOMEM;
wkup_np = np;
break;
}