OSDN Git Service

media: v4l2-ctrls.c: initialize an error return code with zero
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 14 Sep 2018 09:56:28 +0000 (05:56 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 24 Sep 2018 13:51:00 +0000 (09:51 -0400)
Fix this smatch error:

drivers/media/v4l2-core/v4l2-ctrls.c:2971 v4l2_ctrl_request_clone() error: uninitialized symbol 'err'.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls.c

index 95d065d..5310ac8 100644 (file)
@@ -2879,7 +2879,7 @@ static int v4l2_ctrl_request_clone(struct v4l2_ctrl_handler *hdl,
                                   const struct v4l2_ctrl_handler *from)
 {
        struct v4l2_ctrl_ref *ref;
-       int err;
+       int err = 0;
 
        if (WARN_ON(!hdl || hdl == from))
                return -EINVAL;