]> git.baikalelectronics.ru Git - kernel.git/commit
X86: intel_ips, check for kzalloc properly
authorJiri Slaby <jslaby@suse.cz>
Mon, 21 Jun 2010 15:40:15 +0000 (17:40 +0200)
committerMatthew Garrett <mjg@redhat.com>
Tue, 3 Aug 2010 13:48:48 +0000 (09:48 -0400)
commitce37d8bb1bbb98218cce0c721da663a7865dbbe2
tree426f193628cf83689c11dc7a4e8d5afd805a9421
parent2b0138660fa9be8274ffa1dbce70857cd9724007
X86: intel_ips, check for kzalloc properly

Stanse found that there are two NULL checks missing in ips_monitor. So
check their value too and bail out appropriately if the allocation
failed.

While at it, add one more kfree to the fail path. It is not necessary
now, but may be needed in the future when a new allocation is added.
And for completeness.

Also remove unneeded initialization of the variables. They are all set
right after their declaration.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/platform/x86/intel_ips.c