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)
commite9ec7f3539cbeae8ffc5d7b30543e5612df5cba3
tree426f193628cf83689c11dc7a4e8d5afd805a9421
parentdfec5c48cdfdcb08d73d24cbf277de543ef864ae
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