On Tue Sep 22 13:34:22 2026 +0300, Dan Carpenter wrote:
> The v4l2_subdev_lock_and_get_active_state() function never returns
> error pointers. As the comments explain, it "returns the locked active
> state for the subdevice, or NULL if the subdev does not support active
> state." None of the other callers check for an error pointer return.
>
> Delete this unnecessary check.
>
> Signed-off-by: Dan Carpenter <[email protected]>
> Reviewed-by: Yemike Abhilash Chandra <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>
Patch committed.
Thanks,
Sakari Ailus
drivers/media/platform/ti/cal/cal-video.c | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/drivers/media/platform/ti/cal/cal-video.c
b/drivers/media/platform/ti/cal/cal-video.c
index 59f0cc4f0d1a..1990cab77344 100644
--- a/drivers/media/platform/ti/cal/cal-video.c
+++ b/drivers/media/platform/ti/cal/cal-video.c
@@ -130,8 +130,6 @@ static int cal_call_active_state_set_fmt(struct v4l2_subdev
*source,
int ret;
source_state = v4l2_subdev_lock_and_get_active_state(source);
- if (IS_ERR(source_state))
- return PTR_ERR(source_state);
ret = v4l2_subdev_call(source, pad, set_fmt, NULL, source_state, fmt);
if (source_state)
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]