]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: rtl8712: freeing an ERR_PTR
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 8 Apr 2015 11:19:00 +0000 (14:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 May 2015 23:58:04 +0000 (01:58 +0200)
commitb5eed730bd3f216dd172d2d699686000f8cb9b38
treed3ffe9b05c4eafa29383edbc6de003e0bcf52087
parentbb6ce8b28d97f39c591e94322e3ad28ff22649b2
staging: rtl8712: freeing an ERR_PTR

If memdup_user() fails then "pparmbuf" is an error pointer and we can't
pass it to kfree().  I changed the "goto _r871x_mp_ioctl_hdl_exit" to a
direct return.

I changed the earlier goto to a direct return as well for consistency
and removed the "pparmbuf = NULL" initializer since it's no longer
needed.

Fixes: 45de432775d6 ('Staging: rtl8712: Use memdup_user() instead of copy_from_user()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c