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 09:49:04 +0000 (11:49 +0200)
commita692a28626e205ecd5dc5de8580bfe362ff0e54c
treed293886527073d9a39e92330aba0a1d7961df788
parentb0eecd0e3c05ac0b7d9d7ca420beeea30126b68d
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