From: Dan Carpenter <dan.carpenter@oracle.com>
To: Derek Chickles <derek.chickles@caviumnetworks.com>,
Vijaya Mohan Guvva <vijaya.guvva@cavium.com>
Cc: Satanand Burla <satananda.burla@caviumnetworks.com>,
Felix Manlunas <felix.manlunas@caviumnetworks.com>,
Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH net-next] liquidio: Missing error code in liquidio_init_nic_module()
Date: Tue, 14 Nov 2017 09:14:17 +0300 [thread overview]
Message-ID: <20171114061417.ejguuk3tef3lq4r5@mwanda> (raw)
We accidentally return success if lio_vf_rep_modinit() fails instead of
propogating the error code.
Fixes: e20f469660ad ("liquidio: synchronize VF representor names with NIC firmware")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index f05045a69dcc..6aa0eee88ea5 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -4038,7 +4038,8 @@ static int liquidio_init_nic_module(struct octeon_device *oct)
*/
if (!oct->octeon_id &&
oct->fw_info.app_cap_flags & LIQUIDIO_SWITCHDEV_CAP) {
- if (lio_vf_rep_modinit()) {
+ retval = lio_vf_rep_modinit();
+ if (retval) {
liquidio_stop_nic_module(oct);
goto octnet_init_failure;
}
next reply other threads:[~2017-11-14 6:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 6:14 Dan Carpenter [this message]
2017-11-14 13:01 ` [PATCH net-next] liquidio: Missing error code in liquidio_init_nic_module() David Miller
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=20171114061417.ejguuk3tef3lq4r5@mwanda \
--to=dan.carpenter@oracle.com \
--cc=derek.chickles@caviumnetworks.com \
--cc=felix.manlunas@caviumnetworks.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raghu.vatsavayi@caviumnetworks.com \
--cc=satananda.burla@caviumnetworks.com \
--cc=vijaya.guvva@cavium.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