diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-08-08 11:59:15 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2025-08-25 16:40:40 +0300 |
| commit | f37df9a0eb5e43fcfe02cbaef076123dc0d79c7e (patch) | |
| tree | fbc8ab88c099cdd318344a9c19675f7f1c4dc25d /include/linux/workqueue_api.h | |
| parent | 880c2395eb9c72938ae65bdb785d28426884d72f (diff) | |
| download | linux-f37df9a0eb5e43fcfe02cbaef076123dc0d79c7e.tar.xz | |
media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try()
v4l2_subdev_call_state_try() macro allocates a subdev state with
__v4l2_subdev_state_alloc(), but does not check the returned value. If
__v4l2_subdev_state_alloc fails, it returns an ERR_PTR, and that would
cause v4l2_subdev_call_state_try() to crash.
Add proper error handling to v4l2_subdev_call_state_try().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fixes: 982c0487185b ("media: subdev: Add v4l2_subdev_call_state_try() macro")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aJTNtpDUbTz7eyJc%40stanley.mountain/
Cc: stable@vger.kernel.org
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
