diff options
author | Mario Limonciello <mario.limonciello@dell.com> | 2017-11-15 23:21:13 +0300 |
---|---|---|
committer | Darren Hart (VMware) <dvhart@infradead.org> | 2017-11-17 04:49:49 +0300 |
commit | 5246741a3f2e0285394cf74f3105cb252b8f38ad (patch) | |
tree | f7dcf2449f8ba32574e752110f7d0407b17acc4a /drivers/platform | |
parent | 868b8d33f91e431b1961a35baa6b5022639067f3 (diff) | |
download | linux-5246741a3f2e0285394cf74f3105cb252b8f38ad.tar.xz |
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: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index c4903c5ce7cf..2d704361f672 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -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); |