From: Wei Yongjun <weiyj.lk@gmail.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>,
Ariel Elior <Ariel.Elior@qlogic.com>
Cc: Wei Yongjun <weiyj.lk@gmail.com>,
everest-linux-l2@qlogic.com, netdev@vger.kernel.org
Subject: [PATCH -next] qed: Fix error return code in qed_resc_alloc()
Date: Tue, 2 Aug 2016 00:55:34 +0000 [thread overview]
Message-ID: <1470099334-14490-1-git-send-email-weiyj.lk@gmail.com> (raw)
Fix to return error code -EINVAL instead of 0 when EQ elements is
too larger, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
---
drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 1a53c04..648c814 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -509,6 +509,7 @@ int qed_resc_alloc(struct qed_dev *cdev)
DP_ERR(p_hwfn,
"Cannot allocate 0x%x EQ elements. The maximum of a u16 chain is 0x%x\n",
n_eqes, 0xFFFF);
+ rc = -EINVAL;
goto alloc_err;
}
next reply other threads:[~2016-08-02 1:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 0:55 Wei Yongjun [this message]
2016-08-02 4:37 ` [PATCH -next] qed: Fix error return code in qed_resc_alloc() 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=1470099334-14490-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=everest-linux-l2@qlogic.com \
--cc=netdev@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).