staging: wilc1000: fix freeing of ERR_PTR
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 4 Sep 2015 10:04:15 +0000 (15:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:43 +0000 (18:24 -0700)
commit360e27a91dd25fb7cf3b2befa1e1a7b4f27828d2
treedc6cbc8e2692a42d44c843a7105975a2dc32b0b0
parentd42ab0838d040bb57b2368125aeb49a8bf1d2383
staging: wilc1000: fix freeing of ERR_PTR

If memdup_user() fails then it will return the error code in ERR_PTR. We
were checking it with IS_ERR but then again trying to free it on the
error path.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c