@@ -1681,7 +1681,7 @@ __v4l2_subdev_state_get_format_stream(struct v4l2_subdev_state *state,
return NULL;
if (state->pads) {
- if (stream)
+ if (WARN_ON(stream))
return NULL;
if (WARN_ON(pad >= state->sd->entity.num_pads))
@@ -1715,7 +1715,7 @@ __v4l2_subdev_state_get_crop_stream(struct v4l2_subdev_state *state,
return NULL;
if (state->pads) {
- if (stream)
+ if (WARN_ON(stream))
return NULL;
if (WARN_ON(pad >= state->sd->entity.num_pads))
@@ -1749,7 +1749,7 @@ __v4l2_subdev_state_get_compose_stream(struct v4l2_subdev_state *state,
return NULL;
if (state->pads) {
- if (stream)
+ if (WARN_ON(stream))
return NULL;
if (WARN_ON(pad >= state->sd->entity.num_pads))
Warn if the stream is set ot a non-zero value on sub-device pad state access functions. A driver bug is required for triggering the warning. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/media/v4l2-core/v4l2-subdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)