From: <Adham.Abozaeid@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
<johannes@sipsolutions.net>, <Ajay.Kathat@microchip.com>,
<Adham.Abozaeid@microchip.com>
Subject: [PATCH v2 2/2] staging: wilc1000: return kernel error codes from wilc_wlan_stop
Date: Fri, 9 Aug 2019 18:25:19 +0000 [thread overview]
Message-ID: <20190809182510.22443-3-adham.abozaeid@microchip.com> (raw)
In-Reply-To: <20190809182510.22443-1-adham.abozaeid@microchip.com>
From: Adham Abozaeid <adham.abozaeid@microchip.com>
return -EIO for bus failures, 0 otherwise.
Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
---
drivers/staging/wilc1000/wilc_wlan.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 3d902b499a34..2bbb359d2119 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -979,7 +979,7 @@ int wilc_wlan_stop(struct wilc *wilc, struct wilc_vif *vif)
if (!ret) {
netdev_err(vif->ndev, "Error while reading reg\n");
release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
- return ret;
+ return -EIO;
}
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_0,
@@ -987,14 +987,14 @@ int wilc_wlan_stop(struct wilc *wilc, struct wilc_vif *vif)
if (!ret) {
netdev_err(vif->ndev, "Error while writing reg\n");
release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
- return ret;
+ return -EIO;
}
ret = wilc->hif_func->hif_read_reg(wilc, WILC_FW_HOST_COMM, ®);
if (!ret) {
netdev_err(vif->ndev, "Error while reading reg\n");
release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
- return ret;
+ return -EIO;
}
reg = BIT(0);
@@ -1002,12 +1002,12 @@ int wilc_wlan_stop(struct wilc *wilc, struct wilc_vif *vif)
if (!ret) {
netdev_err(vif->ndev, "Error while writing reg\n");
release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
- return ret;
+ return -EIO;
}
release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
- return ret;
+ return 0;
}
void wilc_wlan_cleanup(struct net_device *dev)
--
2.17.1
prev parent reply other threads:[~2019-08-09 18:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 18:25 [PATCH v2 0/2] staging: wilc1000: Don't reset WILC CPU disgracefully Adham.Abozaeid
2019-08-09 18:25 ` [PATCH v2 1/2] " Adham.Abozaeid
2019-08-09 18:25 ` Adham.Abozaeid [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=20190809182510.22443-3-adham.abozaeid@microchip.com \
--to=adham.abozaeid@microchip.com \
--cc=Ajay.Kathat@microchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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).