[media] marvell-ccic: fix memory leak on failure path in cafe_smbus_setup()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Sat, 4 Apr 2015 00:16:01 +0000 (21:16 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:50:54 +0000 (07:50 -0300)
commit90ca75fd1945d9e51e21cbde0aae1aad68730dc5
tree3726bc1c49c1b33839621e4ea1e4f964b324f99f
parent8380b7e449d800037330011c4e0ab5caeab91a6b
[media] marvell-ccic: fix memory leak on failure path in cafe_smbus_setup()

If i2c_add_adapter() fails, adap is not deallocated.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/marvell-ccic/cafe-driver.c