OSDN Git Service

media: fsl-viu: fix error handling in viu_of_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 29 Jun 2018 21:49:22 +0000 (17:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:07 +0000 (16:59 -0700)
commitaf58a41db9cc506bb323982a3d2e56a21fad9934
treeb980a871b219a4cd906fe906548d6415fd0801c1
parentec0e373a62147960a4ab8692e33e0658ccccc9b1
media: fsl-viu: fix error handling in viu_of_probe()

[ Upstream commit 662a99e145661c2b35155cf375044deae9b79896 ]

viu_of_probe() ignores fails in i2c_get_adapter(),
tries to unlock uninitialized mutex on error path.

The patch streamlining the error handling in viu_of_probe().

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/fsl-viu.c