summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/alienware-wmi.c (follow)
Commit message (Collapse)AuthorAge
* platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointerColin Ian King2020-05-27
| | | | | | | | | | | | | | | | | | commit 98e2630284ab741804bd0713e932e725466f2f84 upstream. Currently the kfree of output.pointer can be potentially freeing an uninitalized pointer in the case where out_data is NULL. Fix this by reworking the case where out_data is not-null to perform the ACPI status check and also the kfree of outpoint.pointer in one block and hence ensuring the pointer is only freed when it has been used. Also replace the if (ptr != NULL) idiom with just if (ptr). Fixes: ff0e9f26288d ("platform/x86: alienware-wmi: Correct a memory leak") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* platform/x86: alienware-wmi: printing the wrong error codeDan Carpenter2020-01-29
| | | | | | | | | | | | | | [ Upstream commit 6d1f8b3d75419a8659ac916a1e9543bb3513a882 ] The "out_data" variable is uninitialized at the point. Originally, this used to print "status" instead and that seems like the correct thing to print. Fixes: bc2ef884320b ("alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
* platform/x86: alienware-wmi: Correct a memory leakMario Limonciello2018-09-29
| | | | | | | | | | | | commit ff0e9f26288d2daee4950f42b37a3d3d30d36ec1 upstream. An ACPI buffer that was allocated was not being freed after use. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Cc: stable@vger.kernel.org Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* platform: x86: drop owner assignment from platform_driversWolfram Sang2014-10-20
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* alienware-wmi: make hdmi_mux enabled on case-by-case basisMario Limonciello2014-08-16
| | | | | | | | Not all HW supporting WMAX method will support the HDMI mux feature. Explicitly quirk the HW that does support it. Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* alienware-wmi: Mark DMI table as __initconstMathias Krause2014-08-16
| | | | | | | | | The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released appropriately. In turn, the callback function can be marked with __init, too. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable statusMario Limonciello2014-06-10
| | | | | | | | Since there are now multiple HDMI attributes associated with the WMAX method, create a sysfs group for them instead. Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* alienware-wmi: Update WMAX brightness method limit to 15Mario Limonciello2014-06-09
| | | | | | | This more closely reflects what the hardware can actually support. Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* alienware-wmi: cover some scenarios where memory allocations would failMario Limonciello2014-04-10
| | | | | | | | | Intel test builder caught a few instances that should test if kzalloc failed to allocate memory as well as a scenario that platform_driver wasn't properly initialized. Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* Add WMI driver for controlling AlienFX features on some Alienware productsMario Limonciello2014-04-06
Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>