xc2028: unlock on error in xc2028_set_config()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Feb 2016 15:34:00 +0000 (13:34 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 May 2017 04:19:47 +0000 (21:19 -0700)
commitbd2d6cb00d1aee5df63dc95aedaf1f2b2a7d9d4e
treeb657bbd4255c5f3d61616c6d30f423f0799016bb
parent716bcfeb12b8d55d278af47b927839b382d2837a
xc2028: unlock on error in xc2028_set_config()

commit 210bd104c6acd31c3c6b8b075b3f12d4a9f6b60d upstream.

We have to unlock before returning -ENOMEM.

Fixes: 8dfbcc4351a0 ('[media] xc2028: avoid use after free')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/tuners/tuner-xc2028.c