media: rkisp1: Simplify rkisp1_entities_register() error path
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 24 Feb 2022 14:24:10 +0000 (14:24 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 27 Jun 2022 07:02:50 +0000 (08:02 +0100)
commit6ff02276beb93e305a463fb950f3501a60a887f8
tree99c9f2c99bd9df3e3b63b63d5ed04a7395a991ac
parent6adceb706e51bb5ff3c2a9700a0ee275ee0c76b2
media: rkisp1: Simplify rkisp1_entities_register() error path

Now that all the unregistration functions are safe to call on
non-registered entities, the error path in rkisp1_entities_register()
can be simplified. Factor out the unregistration to a separate function
to share code with rkisp1_remove().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c