media: vpss: clean up resources in init
authorEvgeny Novikov <novikov@ispras.ru>
Fri, 10 Jul 2020 09:02:23 +0000 (11:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 08:29:04 +0000 (10:29 +0200)
commit0bd77f37daf707706ebe5c98f1744c317e71540a
treeeb70a654271038c958e5a46ee6559b1bbce5522e
parent3264112eb59b242aac2e3202464478452b6cc942
media: vpss: clean up resources in init

[ Upstream commit 9c487b0b0ea7ff22127fe99a7f67657d8730ff94 ]

If platform_driver_register() fails within vpss_init() resources are not
cleaned up. The patch fixes this issue by introducing the corresponding
error handling.

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

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/davinci/vpss.c