From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kurt Schwemmer <kurt.schwemmer@microsemi.com>,
Logan Gunthorpe <logang@deltatee.com>
Cc: Stephen Bates <stephen.bates@microsemi.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] switchtec: fix some error codes
Date: Mon, 13 Mar 2017 10:52:53 +0000 [thread overview]
Message-ID: <20170313105253.GB24989@mwanda> (raw)
We shouldn't be changing these negative error codes to positive.
Fixes: dbdb73b1e2c0 ("MicroSemi Switchtec management interface driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 82ae08956457..fcde98161d9a 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -656,7 +656,7 @@ static ssize_t switchtec_dev_write(struct file *filp, const char __user *data,
rc = lock_mutex_and_test_alive(stdev);
if (rc)
- return -rc;
+ return rc;
if (stuser->state != MRPC_IDLE) {
rc = -EBADE;
@@ -700,7 +700,7 @@ static ssize_t switchtec_dev_read(struct file *filp, char __user *data,
rc = lock_mutex_and_test_alive(stdev);
if (rc)
- return -rc;
+ return rc;
if (stuser->state = MRPC_IDLE) {
mutex_unlock(&stdev->mrpc_mutex);
@@ -722,7 +722,7 @@ static ssize_t switchtec_dev_read(struct file *filp, char __user *data,
rc = lock_mutex_and_test_alive(stdev);
if (rc)
- return -rc;
+ return rc;
if (stuser->state != MRPC_DONE) {
mutex_unlock(&stdev->mrpc_mutex);
reply other threads:[~2017-03-13 10:52 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=20170313105253.GB24989@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bhelgaas@google.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kurt.schwemmer@microsemi.com \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=stephen.bates@microsemi.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