Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1366479 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-03-29 19:10 +0200 |
| Last post | 2016-03-30 21:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] qed: initialize return rc to avoid returning garbage Colin King <colin.king@canonical.com> - 2016-03-29 19:10 +0200
RE: [PATCH] qed: initialize return rc to avoid returning garbage Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-03-29 20:50 +0200
Re: [PATCH] qed: initialize return rc to avoid returning garbage David Miller <davem@davemloft.net> - 2016-03-30 21:50 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-03-29 19:10 +0200 |
| Subject | [PATCH] qed: initialize return rc to avoid returning garbage |
| Message-ID | <ri5js-TR-15@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
in the case where qed_slowpath_irq_req is not called, rc is not
assigned and so qed_int_igu_enable will return a garbage value.
Fix this by initializing rc to 0.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_int.c b/drivers/net/ethernet/qlogic/qed/qed_int.c
index ffd0acc..2017b01 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_int.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_int.c
@@ -2750,7 +2750,7 @@ void qed_int_igu_enable_int(struct qed_hwfn *p_hwfn,
int qed_int_igu_enable(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
enum qed_int_mode int_mode)
{
- int rc;
+ int rc = 0;
/* Configure AEU signal change to produce attentions */
qed_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0);
--
2.7.4
[toc] | [next] | [standalone]
| From | Yuval Mintz <Yuval.Mintz@qlogic.com> |
|---|---|
| Date | 2016-03-29 20:50 +0200 |
| Message-ID | <ri6Se-1Nr-11@gated-at.bofh.it> |
| In reply to | #1366479 |
> From: Colin Ian King <colin.king@canonical.com> > > in the case where qed_slowpath_irq_req is not called, rc is not assigned and so > qed_int_igu_enable will return a garbage value. > Fix this by initializing rc to 0. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> Thanks Colin. Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-03-30 21:50 +0200 |
| Message-ID | <riuhQ-1Jv-15@gated-at.bofh.it> |
| In reply to | #1366479 |
From: Colin King <colin.king@canonical.com> Date: Tue, 29 Mar 2016 18:00:50 +0100 > From: Colin Ian King <colin.king@canonical.com> > > in the case where qed_slowpath_irq_req is not called, rc is not > assigned and so qed_int_igu_enable will return a garbage value. > Fix this by initializing rc to 0. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> Applied, thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web