diff mbox series

staging: media: atomisp: [1/2] Remove redundant assertions in sh_css.c

Message ID 20210415005106.530914-9-vrzh@vrzh.net
State New
Headers show
Series staging: media: atomisp: [1/2] Remove redundant assertions in sh_css.c | expand

Commit Message

Martiros Shakhzadyan April 15, 2021, 12:51 a.m. UTC
Remove assert() in places where the condition is already handled.

Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
---
 drivers/staging/media/atomisp/pci/sh_css.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 4e3ef68014ec..aebecf650967 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -413,7 +413,6 @@  aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
 static void
 sh_css_pipe_free_shading_table(struct ia_css_pipe *pipe)
 {
-	assert(pipe);
 	if (!pipe) {
 		IA_CSS_ERROR("NULL input parameter");
 		return;
@@ -1080,7 +1079,6 @@  sh_css_config_input_network(struct ia_css_stream *stream)
 		}
 	}
 
-	assert(pipe);
 	if (!pipe)
 		return -EINVAL;
 
@@ -1382,10 +1380,11 @@  start_copy_on_sp(struct ia_css_pipe *pipe,
 		 struct ia_css_frame *out_frame)
 {
 	(void)out_frame;
-	assert(pipe);
-	assert(pipe->stream);
 
-	if ((!pipe) || (!pipe->stream))
+	if (!pipe)
+		return -EINVAL;
+
+	if (!pipe->stream)
 		return -EINVAL;
 
 #if !defined(ISP2401)