Commit c0633711 authored by Martiros Shakhzadyan's avatar Martiros Shakhzadyan Committed by Mauro Carvalho Chehab

media: staging: media: atomisp: Remove redundant assertions in sh_css.c

Remove assert() in places where the condition is already handled.
Signed-off-by: default avatarMartiros Shakhzadyan <vrzh@vrzh.net>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6ceb5576
...@@ -413,7 +413,6 @@ aspect_ratio_crop(struct ia_css_pipe *curr_pipe, ...@@ -413,7 +413,6 @@ aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
static void static void
sh_css_pipe_free_shading_table(struct ia_css_pipe *pipe) sh_css_pipe_free_shading_table(struct ia_css_pipe *pipe)
{ {
assert(pipe);
if (!pipe) { if (!pipe) {
IA_CSS_ERROR("NULL input parameter"); IA_CSS_ERROR("NULL input parameter");
return; return;
...@@ -1080,7 +1079,6 @@ sh_css_config_input_network(struct ia_css_stream *stream) ...@@ -1080,7 +1079,6 @@ sh_css_config_input_network(struct ia_css_stream *stream)
} }
} }
assert(pipe);
if (!pipe) if (!pipe)
return -EINVAL; return -EINVAL;
...@@ -1382,8 +1380,6 @@ start_copy_on_sp(struct ia_css_pipe *pipe, ...@@ -1382,8 +1380,6 @@ start_copy_on_sp(struct ia_css_pipe *pipe,
struct ia_css_frame *out_frame) struct ia_css_frame *out_frame)
{ {
(void)out_frame; (void)out_frame;
assert(pipe);
assert(pipe->stream);
if ((!pipe) || (!pipe->stream)) if ((!pipe) || (!pipe->stream))
return -EINVAL; return -EINVAL;
...@@ -1837,7 +1833,6 @@ map_sp_threads(struct ia_css_stream *stream, bool map) ...@@ -1837,7 +1833,6 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
int err = 0; int err = 0;
enum ia_css_pipe_id pipe_id; enum ia_css_pipe_id pipe_id;
assert(stream);
IA_CSS_ENTER_PRIVATE("stream = %p, map = %s", IA_CSS_ENTER_PRIVATE("stream = %p, map = %s",
stream, map ? "true" : "false"); stream, map ? "true" : "false");
...@@ -1904,7 +1899,6 @@ create_host_pipeline_structure(struct ia_css_stream *stream) ...@@ -1904,7 +1899,6 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
unsigned int copy_pipe_delay = 0, unsigned int copy_pipe_delay = 0,
capture_pipe_delay = 0; capture_pipe_delay = 0;
assert(stream);
IA_CSS_ENTER_PRIVATE("stream = %p", stream); IA_CSS_ENTER_PRIVATE("stream = %p", stream);
if (!stream) { if (!stream) {
...@@ -1913,7 +1907,6 @@ create_host_pipeline_structure(struct ia_css_stream *stream) ...@@ -1913,7 +1907,6 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
} }
main_pipe = stream->last_pipe; main_pipe = stream->last_pipe;
assert(main_pipe);
if (!main_pipe) { if (!main_pipe) {
IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL); IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL);
return -EINVAL; return -EINVAL;
...@@ -2317,7 +2310,6 @@ static void sh_css_pipe_free_acc_binaries( ...@@ -2317,7 +2310,6 @@ static void sh_css_pipe_free_acc_binaries(
struct ia_css_pipeline *pipeline; struct ia_css_pipeline *pipeline;
struct ia_css_pipeline_stage *stage; struct ia_css_pipeline_stage *stage;
assert(pipe);
if (!pipe) { if (!pipe) {
IA_CSS_ERROR("NULL input pointer"); IA_CSS_ERROR("NULL input pointer");
return; return;
......
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