From: Nishka Dasgupta <nishkadg.linux@gmail.com>
To: gregkh@linuxfoundation.org, straube.linux@gmail.com,
realwakka@gmail.com, hle@owl.eu.com, rico.schrage@gmail.com,
sophie.matter@web.de, weiyongjun1@huawei.com,
jbi.octave@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: Nishka Dasgupta <nishkadg.linux@gmail.com>
Subject: [PATCH v2] staging: pi433: Remove unnecessary variable
Date: Thu, 23 May 2019 18:23:41 +0530 [thread overview]
Message-ID: <20190523125340.29338-1-nishkadg.linux@gmail.com> (raw)
The variable retval is assigned constant values twice, and can therefore
be replaced by its values.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
Changes in v2:
- Add Wei Yongjun to the recipients list
- Fix From and Signed-off-by fields
drivers/staging/pi433/pi433_if.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index c889f0bdf424..40c6f4e7632f 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -871,7 +871,6 @@ pi433_write(struct file *filp, const char __user *buf,
static long
pi433_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
- int retval = 0;
struct pi433_instance *instance;
struct pi433_device *device;
struct pi433_tx_cfg tx_cfg;
@@ -923,10 +922,10 @@ pi433_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
mutex_unlock(&device->rx_lock);
break;
default:
- retval = -EINVAL;
+ return -EINVAL;
}
- return retval;
+ return 0;
}
#ifdef CONFIG_COMPAT
--
2.19.1
reply other threads:[~2019-05-23 12:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190523125340.29338-1-nishkadg.linux@gmail.com \
--to=nishkadg.linux@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hle@owl.eu.com \
--cc=jbi.octave@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=realwakka@gmail.com \
--cc=rico.schrage@gmail.com \
--cc=sophie.matter@web.de \
--cc=straube.linux@gmail.com \
--cc=weiyongjun1@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
all inboxes | Powered by JetHome®