Skip to contentSkip to conversation

acenic: Pass up error code from ace_load_firmware()

PATCH Applied Ben Hutchings 2 participants 2 messages Oct 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acenic: Pass up error code from ace_load_firmware()

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.

---
Compile-tested only.

Ben.

 drivers/net/acenic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/acenic.c +2 -1
index 08419ee..12bfc44 100644
@@ -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;
Signature · 1 line
1.6.4.3