staging: wilc1000: add check for kmalloc allocation failure.
authorColin Ian King <colin.king@canonical.com>
Tue, 28 Feb 2017 11:47:33 +0000 (11:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:08 +0000 (09:17 +0100)
commit6cc0c259d034c6ab48f4e12f505213988e73d380
treea9b8e119686192eb3ea06d70f3cfca2c66bf1be6
parent2af5f669be1446a7db56c699265bc9e4cda92577
staging: wilc1000: add check for kmalloc allocation failure.

Add a sanity check that wid.val has been allocated, fixes a null
pointer deference on stamac when calling ether_add_copy.

Detected by CoverityScan, CID#1369537 ("Dereference null return value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c