From: Aaron Lu Date: Thu, 25 Apr 2013 02:47:49 +0000 (+0000) Subject: ACPI: video: correct acpi_video_bus_add error processing X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~92^2~6^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91e13aa37023437c260c85a3f17308052bbfbfa2;p=pandora-kernel.git ACPI: video: correct acpi_video_bus_add error processing acpi_video_bus_get_devices() may fail due to some video output device doesn't have the _ADR method, and in this case, the error processing is to simply free the video structure in acpi_video_bus_add(), while leaving those already registered video output devices in the wild, which means for some video output device, we have already registered a backlight interface and installed a notification handler for it. So it can happen when user is using this system, on hotkey pressing, the notification handler will send a keycode through a non-existing input device, causing kernel freeze. To solve this problem, free all those already registered video output devices once something goes wrong in acpi_video_bus_get_devices(), so that no wild backlight interfaces and notification handlers exist. References: https://bugzilla.kernel.org/show_bug.cgi?id=51731 Reported-and-tested-by: Signed-off-by: Aaron Lu Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed