Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5246741a authored by Mario Limonciello's avatar Mario Limonciello Committed by Darren Hart (VMware)
Browse files

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: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@dell.com>
Tested-by: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent 868b8d33
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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);