staging: wilc1000: use kmemdup in host_int_add_ptk
authorChaehyun Lim <chaehyun.lim@gmail.com>
Sun, 8 Nov 2015 07:49:04 +0000 (16:49 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:14:03 +0000 (14:14 -0800)
commit8ab8c59218d79effc763d6f20cb0d0bad783fd56
tree13350ee3bef2fca632f6b7d17c8360d4ccb5ab12
parent53bbbb575cb8d557fcf96998da42d0a2ab57d036
staging: wilc1000: use kmemdup in host_int_add_ptk

This patch changes kmalloc followed by memcpy to kmemdup
The error checking is also added when kmemdup is failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c