forked from Minki/linux
hp-wmi: add return value checking for input_allocate_device()
Add error checking and return -ENOMEM if input_allocate_device() fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Thomas Renninger <trenn@suse.de> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
parent
1bd1ca1f4c
commit
bc28596a8f
@ -527,6 +527,8 @@ static int __init hp_wmi_input_setup(void)
|
||||
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";
|
||||
|
Loading…
Reference in New Issue
Block a user