提交 5246741a 编写于 作者: M Mario Limonciello 提交者: Darren Hart (VMware)

platform/x86: dell-laptop: Allocate buffer before rfkill use

On machines using rfkill interface the buffer needs to have been
allocated before the initial use (memset) of it.
Reported-by: NValdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: NMario Limonciello <mario.limonciello@dell.com>
Tested-by: NValdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
上级 868b8d33
......@@ -2073,6 +2073,11 @@ static int __init dell_init(void)
if (ret)
goto fail_platform_device2;
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
if (!buffer)
goto fail_buffer;
ret = dell_setup_rfkill();
if (ret) {
......@@ -2080,10 +2085,6 @@ static int __init dell_init(void)
goto fail_rfkill;
}
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
if (!buffer)
goto fail_buffer;
if (quirks && quirks->touchpad_led)
touchpad_led_init(&platform_device->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册