[PATCH] acenic: Pass up error code from ace_load_firmware()

Subsystems: networking drivers, the rest

STALE6173d

2 messages, 2 authors, 2009-10-12 · open the first message on its own page

[PATCH] acenic: Pass up error code from ace_load_firmware()

From: Ben Hutchings <hidden>
Date: 2009-10-12 01:35:28

If ace_load_firmware() fails, ace_init() cleans up but still returns
0, leading to an oops as seen in <http://bugs.debian.org/521383>.
It should pass the error code up.

Signed-off-by: Ben Hutchings <redacted>
Cc: stable@kernel.org
---
Compile-tested only.

Ben.

 drivers/net/acenic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 08419ee..12bfc44 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1209,7 +1209,8 @@ static int __devinit ace_init(struct net_device *dev)
 	memset(ap->info, 0, sizeof(struct ace_info));
 	memset(ap->skb, 0, sizeof(struct ace_skb));
 
-	if (ace_load_firmware(dev))
+	ecode = ace_load_firmware(dev);
+	if (ecode)
 		goto init_error;
 
 	ap->fw_running = 0;
-- 
1.6.4.3

Re: [PATCH] acenic: Pass up error code from ace_load_firmware()

From: David Miller <davem@davemloft.net>
Date: 2009-10-12 11:19:13

From: Ben Hutchings <redacted>
Date: Mon, 12 Oct 2009 02:34:46 +0100
If ace_load_firmware() fails, ace_init() cleans up but still returns
0, leading to an oops as seen in <http://bugs.debian.org/521383>.
It should pass the error code up.

Signed-off-by: Ben Hutchings <redacted>
Applied, and I'll queue this up for -stable, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help