提交 a1ea9a40 编写于 作者: K Krzysztof Kozlowski

pinctrl: samsung: Handle memory allocation failure during wakeup banks init

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: NKrzysztof Kozlowski <krzk@kernel.org>
上级 71b96c3a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册