linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-input@vger.kernel.org,
	Arvind Yadav <arvind.yadav.cs@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Joe Perches <joe@perches.com>, Johan Hovold <johan@kernel.org>,
	Zhen Lei <thunder.leizhen@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/3] Input: ims-pcu: Delete an unnecessary variable assignment in ims_pcu_setup_gamepad()
Date: Thu, 25 Jan 2018 19:54:47 +0100	[thread overview]
Message-ID: <903a941e-a562-0456-da6e-9a801254c853@users.sourceforge.net> (raw)
In-Reply-To: <ff77a871-d30a-e873-ab73-2d80198bfbe7@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 25 Jan 2018 19:37:34 +0100

An error code was assigned to a local variable in an if branch.
This value was not read again before it was used by a return statement
as a constant value at the end of this function.
Thus remove such an unneeded assignment.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/input/misc/ims-pcu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c
index d7778b273151..aa1bb284c714 100644
--- a/drivers/input/misc/ims-pcu.c
+++ b/drivers/input/misc/ims-pcu.c
@@ -295,7 +295,6 @@ static int ims_pcu_setup_gamepad(struct ims_pcu *pcu)
 	if (!gamepad || !input) {
 		dev_err(pcu->dev,
 			"Not enough memory for gamepad device\n");
-		error = -ENOMEM;
 		goto err_free_mem;
 	}
 
-- 
2.16.1


      parent reply	other threads:[~2018-01-25 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 18:51 [PATCH 0/3] Input: ims-pcu: Adjustments for three function implementations SF Markus Elfring
2018-01-25 18:52 ` [PATCH 1/3] Input: ims-pcu: Delete an error message for a failed memory allocation in ims_pcu_buffers_alloc() SF Markus Elfring
2018-01-25 18:53 ` [PATCH 2/3] Input: ims-pcu: Improve a size determination in two functions SF Markus Elfring
2018-01-25 18:54 ` SF Markus Elfring [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=903a941e-a562-0456-da6e-9a801254c853@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=joe@perches.com \
    --cc=johan@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thunder.leizhen@huawei.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: 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).