From: Andi Shyti <andi.shyti@kernel.org>
To: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [lvc-project] [PATCH] Input: synaptics - remove unreachable code
Date: Tue, 14 Mar 2023 15:04:50 +0100 [thread overview]
Message-ID: <20230314140450.2w3nhp7zpdolbngc@intel.intel> (raw)
In-Reply-To: <20230314124336.1494716-1-Igor.A.Artemiev@mcst.ru>
Hi Igor,
On Tue, Mar 14, 2023 at 03:43:36PM +0300, Igor Artemiev wrote:
> The synaptics_resolution() function always returnd 0.
> And there is no need to check its result.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices")
> Signed-off-by: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
> ---
> drivers/input/mouse/synaptics.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index fa021af8506e..4f1182bf9667 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -444,9 +444,7 @@ static int synaptics_query_hardware(struct psmouse *psmouse,
> if (error)
> return error;
>
> - error = synaptics_resolution(psmouse, info);
> - if (error)
> - return error;
> + synaptics_resolution(psmouse, info);
Again, please make "synaptics_resolution()" void. As it is you
are just ignoring a return value, even if you are sure it's '0'.
Andi
prev parent reply other threads:[~2023-03-14 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 12:43 [lvc-project] [PATCH] Input: synaptics - remove unreachable code Igor Artemiev
2023-03-14 14:04 ` Andi Shyti [this message]
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=20230314140450.2w3nhp7zpdolbngc@intel.intel \
--to=andi.shyti@kernel.org \
--cc=Igor.A.Artemiev@mcst.ru \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).