Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: Documentation: Document new v4l2_ctrl_handler_free() behaviour

v4l2_ctrl_handler_free() no longer resets the handler's error code.
Document it.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Sakari Ailus and committed by
Hans Verkuil
bd227d0f 04f541ce

+3 -6
+3 -6
Documentation/driver-api/media/v4l2-controls.rst
··· 110 110 111 111 v4l2_ctrl_handler_free(&foo->ctrl_handler); 112 112 113 + :c:func:`v4l2_ctrl_handler_free` does not touch the handler's ``error`` field. 113 114 114 115 2) Add controls: 115 116 ··· 192 191 V4L2_CID_TEST_PATTERN, ARRAY_SIZE(test_pattern) - 1, 0, 193 192 0, test_pattern); 194 193 ... 195 - if (foo->ctrl_handler.error) { 196 - int err = foo->ctrl_handler.error; 197 - 198 - v4l2_ctrl_handler_free(&foo->ctrl_handler); 199 - return err; 200 - } 194 + if (foo->ctrl_handler.error) 195 + return v4l2_ctrl_handler_free(&foo->ctrl_handler); 201 196 202 197 The :c:func:`v4l2_ctrl_new_std` function returns the v4l2_ctrl pointer to 203 198 the new control, but if you do not need to access the pointer outside the