diff options
author | Irwan Djajadi <irwan.djajadi@iname.com> | 2006-01-20 20:28:00 (GMT) |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-03-31 06:02:39 (GMT) |
commit | 1fee94034917aa711fcbd4ebf4c36f7ebd9fa7d6 (patch) | |
tree | 2fb60f5c2462654b88764bdf7acfa63a3aa6f4a0 /drivers/acpi/hotkey.c | |
parent | ce362c009250340358a7221f3cdb7954cbf19c01 (diff) | |
download | linux-fsl-qoriq-1fee94034917aa711fcbd4ebf4c36f7ebd9fa7d6.tar.xz |
[ACPI] drivers/acpi/hotkey.c: check kmalloc return value
Signed-off-by: Irwan Djajadi <irwan.djajadi@iname.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/hotkey.c')
-rw-r--r-- | drivers/acpi/hotkey.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c index 2e2e4051..c25b2b9 100644 --- a/drivers/acpi/hotkey.c +++ b/drivers/acpi/hotkey.c @@ -723,6 +723,8 @@ get_parms(char *config_record, goto do_fail; count = tmp1 - tmp; *action_handle = (char *)kmalloc(count + 1, GFP_KERNEL); + if (!*action_handle) + goto do_fail; strncpy(*action_handle, tmp, count); *(*action_handle + count) = 0; |