media: atomisp: add error logging to atomisp_destroy_pipes_stream_force()
authorHans de Goede <hdegoede@redhat.com>
Wed, 15 Jun 2022 20:50:32 +0000 (21:50 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 15:38:11 +0000 (16:38 +0100)
__destroy_streams() and __destroy_pipes() may return an error.
Log a warning when either of them fails.

Link: https://lore.kernel.org/linux-media/20220615205037.16549-36-hdegoede@redhat.com
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c

index 6375cfb839d4c562589c3166cbaa08ca801fd883..358ef29f27bae10c849587faaf206df6e5f98027 100644 (file)
@@ -581,8 +581,11 @@ static int __destroy_pipes(struct atomisp_sub_device *asd, bool force)
 
 void atomisp_destroy_pipes_stream_force(struct atomisp_sub_device *asd)
 {
-       __destroy_streams(asd, true);
-       __destroy_pipes(asd, true);
+       if (__destroy_streams(asd, true))
+               dev_warn(asd->isp->dev, "destroy stream failed.\n");
+
+       if (__destroy_pipes(asd, true))
+               dev_warn(asd->isp->dev, "destroy pipe failed.\n");
 }
 
 static void __apply_additional_pipe_config(