media: lirc: do not pass ERR_PTR to kfree

If memdup_user() fails, txbuf will be an error pointer and passed
to kfree.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Sean Young 2017-12-13 16:09:21 -05:00 • committed by Mauro Carvalho Chehab
commit a74b2bff59