Commit 3bde235b authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: fix __get_frame_info() error handling

On ia_css_pipe_get_info() errors, destroy both the streams as well
as the pipes which were created.

Link: https://lore.kernel.org/linux-media/20220615205037.16549-34-hdegoede@redhat.comReviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 3a68900a
...@@ -2653,7 +2653,7 @@ static int __get_frame_info(struct atomisp_sub_device *asd, ...@@ -2653,7 +2653,7 @@ static int __get_frame_info(struct atomisp_sub_device *asd,
&p_info); &p_info);
if (ret) { if (ret) {
dev_err(isp->dev, "can't get info from pipe\n"); dev_err(isp->dev, "can't get info from pipe\n");
goto stream_err; goto get_info_err;
} }
switch (type) { switch (type) {
...@@ -2684,6 +2684,8 @@ static int __get_frame_info(struct atomisp_sub_device *asd, ...@@ -2684,6 +2684,8 @@ static int __get_frame_info(struct atomisp_sub_device *asd,
return 0; return 0;
get_info_err:
__destroy_streams(asd, true);
stream_err: stream_err:
__destroy_pipes(asd, true); __destroy_pipes(asd, true);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment