From: Dan Carpenter <dan.carpenter@oracle.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Nick Desaulniers <ndesaulniers@google.com>, Kees Cook <keescook@chromium.org>, Hans Verkuil <hans.verkuil@cisco.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Florian Echtler <floe@butterbrot.org>, linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Input: sur40 - Fix an error code in sur40_probe() Date: Thu, 28 Jan 2021 09:36:17 +0000 [thread overview] Message-ID: <YBKFkbATXa5fA3xj@mwanda> (raw) If v4l2_ctrl_handler_setup() fails then probe() should return an error code instead of returning success. Fixes: cee1e3e2ef39 ("media: add video control handlers using V4L2 control framework") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/input/touchscreen/sur40.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 620cdd7d214a..12f2562b0141 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -787,6 +787,7 @@ static int sur40_probe(struct usb_interface *interface, dev_err(&interface->dev, "Unable to register video controls."); v4l2_ctrl_handler_free(&sur40->hdl); + error = sur40->hdl.error; goto err_unreg_v4l2; } -- 2.29.2
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Nick Desaulniers <ndesaulniers@google.com>, Kees Cook <keescook@chromium.org>, Hans Verkuil <hans.verkuil@cisco.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Florian Echtler <floe@butterbrot.org>, linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Input: sur40 - Fix an error code in sur40_probe() Date: Thu, 28 Jan 2021 12:36:17 +0300 [thread overview] Message-ID: <YBKFkbATXa5fA3xj@mwanda> (raw) If v4l2_ctrl_handler_setup() fails then probe() should return an error code instead of returning success. Fixes: cee1e3e2ef39 ("media: add video control handlers using V4L2 control framework") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/input/touchscreen/sur40.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 620cdd7d214a..12f2562b0141 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -787,6 +787,7 @@ static int sur40_probe(struct usb_interface *interface, dev_err(&interface->dev, "Unable to register video controls."); v4l2_ctrl_handler_free(&sur40->hdl); + error = sur40->hdl.error; goto err_unreg_v4l2; } -- 2.29.2
next reply other threads:[~2021-01-28 9:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-28 9:36 Dan Carpenter [this message] 2021-01-28 9:36 ` [PATCH] Input: sur40 - Fix an error code in sur40_probe() Dan Carpenter 2021-02-17 4:37 ` Dmitry Torokhov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YBKFkbATXa5fA3xj@mwanda \ --to=dan.carpenter@oracle.com \ --cc=dmitry.torokhov@gmail.com \ --cc=floe@butterbrot.org \ --cc=hans.verkuil@cisco.com \ --cc=keescook@chromium.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-input@vger.kernel.org \ --cc=mchehab@kernel.org \ --cc=ndesaulniers@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.