Message ID | 201007202219.o6KMJplm021085@imap1.linux-foundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff -puN drivers/platform/x86/hp-wmi.c~hp-wmi-add-return-value-checking-for-input_allocate_device drivers/platform/x86/hp-wmi.c --- a/drivers/platform/x86/hp-wmi.c~hp-wmi-add-return-value-checking-for-input_allocate_device +++ a/drivers/platform/x86/hp-wmi.c @@ -527,6 +527,8 @@ static int __init hp_wmi_input_setup(voi int err; hp_wmi_input_dev = input_allocate_device(); + if (!hp_wmi_input_dev) + return -ENOMEM; hp_wmi_input_dev->name = "HP WMI hotkeys"; hp_wmi_input_dev->phys = "wmi/input0";