* [PATCH] qed: initialize return rc to avoid returning garbage
@ 2016-03-29 17:00 Colin King
2016-03-29 18:28 ` Yuval Mintz
2016-03-30 19:48 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2016-03-29 17:00 UTC (permalink / raw)
To: Yuval Mintz, Ariel Elior, everest-linux-l2, netdev; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] qed: initialize return rc to avoid returning garbage
2016-03-29 17:00 [PATCH] qed: initialize return rc to avoid returning garbage Colin King
@ 2016-03-29 18:28 ` Yuval Mintz
2016-03-30 19:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Yuval Mintz @ 2016-03-29 18:28 UTC (permalink / raw)
To: Colin King, netdev; +Cc: linux-kernel, Dept-Eng Everest Linux L2, Ariel Elior
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qed: initialize return rc to avoid returning garbage
2016-03-29 17:00 [PATCH] qed: initialize return rc to avoid returning garbage Colin King
2016-03-29 18:28 ` Yuval Mintz
@ 2016-03-30 19:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-03-30 19:48 UTC (permalink / raw)
To: colin.king
Cc: Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev, linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-30 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 17:00 [PATCH] qed: initialize return rc to avoid returning garbage Colin King
2016-03-29 18:28 ` Yuval Mintz
2016-03-30 19:48 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.