OpenCloudOS-Kernel/drivers/platform/x86
Axel Lin 8fcf71aa00 platform-drivers-x86: asus-laptop: fix wrong test for successful registered led_classdev
device_create returns &struct device pointer on success, or ERR_PTR() on error.
Thus if led_classdev_register fails, led_cdev->dev is always not NULL.

Thus to unregister a successful registered led_classdev, we should check
IS_ERR_OR_NULL macro for led_cdev->dev instead of checking if led_cdev->dev
is NULL or not.

we use IS_ERR_OR_NULL instead of IS_ERR because if we havn't call
led_classdev_register, the led_cdev->dev is NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24 16:52:38 +02:00
..
Kconfig asus-laptop: Platform detection for Pegatron Lucid 2011-10-24 16:52:37 +02:00
Makefile Platform: Samsung Q10 backlight driver 2011-08-05 14:46:17 -04:00
acer-wmi.c acer-wmi: Add wireless quirk for Lenovo 3000 N200 2011-10-24 16:52:37 +02:00
acerhdf.c acerhdf.c: spaces in aliased changed to * 2011-08-05 15:21:51 -04:00
asus-laptop.c platform-drivers-x86: asus-laptop: fix wrong test for successful registered led_classdev 2011-10-24 16:52:38 +02:00
asus-nb-wmi.c asus-wmi: add CWAP support and clarify the meaning of WAPF bits 2011-08-05 14:46:04 -04:00
asus-wmi.c platform-drivers-x86: asus-wmi: fix resource leak in asus_wmi_led_exit 2011-10-24 16:52:38 +02:00
asus-wmi.h asus-wmi: add CWAP support and clarify the meaning of WAPF bits 2011-08-05 14:46:04 -04:00
asus_acpi.c asus: Add pr_fmt and convert printks to pr_<level> 2011-05-27 12:35:46 -04:00
classmate-laptop.c backlight: add backlight type 2011-03-22 17:43:59 -07:00
compal-laptop.c drivers/platform/x86: Fix memory leak 2011-07-07 10:39:03 -04:00
dell-laptop.c dell-laptop: support Synaptics/Alps touchpad led 2011-10-24 16:52:37 +02:00
dell-wmi-aio.c dell: Convert printks to pr_<level> 2011-05-27 12:35:47 -04:00
dell-wmi.c dell-wmi: Add keys for Dell XPS L502X 2011-08-05 15:21:47 -04:00
eeepc-laptop.c platform-drivers-x86: eeepc-laptop: fix wrong test for successful registered led_classdev 2011-10-24 16:52:38 +02:00
eeepc-wmi.c asus-wmi: add CWAP support and clarify the meaning of WAPF bits 2011-08-05 14:46:04 -04:00
fujitsu-laptop.c fujitsu-laptop: Convert printks to pr_<level> 2011-05-27 12:35:47 -04:00
hdaps.c hdaps: Convert printks to pr_<level> 2011-05-27 12:35:48 -04:00
hp-wmi.c hp-wmi: fix use after free 2011-07-11 09:52:35 -04:00
hp_accel.c hp_accel: Fix driver name 2011-03-21 17:59:36 +01:00
ibm_rtl.c ibm_rtl: Use pr_fmt and pr_<level> 2011-05-27 12:35:49 -04:00
ideapad-laptop.c platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ideapad_acpi_add error path 2011-08-05 15:21:50 -04:00
intel_ips.c x86 driver: fix typo in TDP override enabling 2011-08-05 15:21:49 -04:00
intel_ips.h drm/i915, intel_ips: When i915 loads after IPS, make IPS relink to i915. 2010-12-23 09:51:36 +00:00
intel_menlow.c platform-drivers-x86: intel_menlow: add missing return AE_OK for intel_menlow_register_sensor() 2011-08-05 14:46:12 -04:00
intel_mid_powerbtn.c platform/x86: Simplify intel_mid_powerbtn 2011-05-27 12:36:46 -04:00
intel_mid_thermal.c platform-drivers-x86: intel_mid_thermal: fix memory leak 2011-08-05 14:46:11 -04:00
intel_oaktrail.c platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM 2011-07-07 11:27:17 -04:00
intel_pmic_gpio.c intel_pmic_gpio: Convert printks to pr_<level> 2011-05-27 12:35:50 -04:00
intel_rar_register.c platform-drivers-x86: intel_rar_register: convert to DEFINE_PCI_DEVICE_TABLE 2011-08-05 14:46:14 -04:00
intel_scu_ipc.c platform-drivers-x86: intel_scu_ipc: convert to DEFINE_PCI_DEVICE_TABLE 2011-08-05 14:46:15 -04:00
intel_scu_ipcutil.c intel_scu_ipcutils: Fix the license tag 2011-01-26 08:57:18 +10:00
msi-laptop.c msi-laptop: add MSI U270 netbook to module alias and scm list 2011-08-05 14:45:39 -04:00
msi-wmi.c platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path 2011-08-05 14:46:10 -04:00
mxm-wmi.c mxm/wmi: add MXMX interface entry point. 2011-05-09 11:40:38 +10:00
panasonic-laptop.c backlight: add backlight type 2011-03-22 17:43:59 -07:00
samsung-laptop.c Platform: Detect samsung laptop quirk when initial level is zero 2011-10-24 16:52:37 +02:00
samsung-q10.c platform-drivers-x86: samsung-q10: make dmi_check_callback return 1 2011-08-05 15:21:47 -04:00
sony-laptop.c platform/x86:delete two unused variables 2011-05-27 12:38:25 -04:00
tc1100-wmi.c tc1100-wmi: Add pr_fmt, use pr_<level> 2011-05-27 12:35:51 -04:00
thinkpad_acpi.c Add KEY_MICMUTE and enable it on Lenovo X220 2011-08-05 14:45:41 -04:00
topstar-laptop.c topstar-latop: ignore 0x82 event 2011-10-24 16:52:37 +02:00
toshiba_acpi.c toshiba_acpi: Initialize brightness in backlight device 2011-10-24 16:52:37 +02:00
toshiba_bluetooth.c toshiba: Convert printks to pr_<level> 2011-05-27 12:35:52 -04:00
wmi.c wmi: Removed trailing whitespace from logging message. 2011-05-27 12:35:53 -04:00
xo1-rfkill.c Add OLPC XO-1 rfkill driver 2010-10-21 10:10:44 -04:00
xo15-ebook.c xo15-ebook: Use pr_<level> 2011-05-27 12:35:53 -04:00