* [PATCH] acenic: Pass up error code from ace_load_firmware()
@ 2009-10-12 1:34 Ben Hutchings
2009-10-12 11:19 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2009-10-12 1:34 UTC (permalink / raw)
To: David Miller; +Cc: Jes Sorensen, linux-acenic, netdev
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 <ben@decadent.org.uk>
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-12 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 1:34 [PATCH] acenic: Pass up error code from ace_load_firmware() Ben Hutchings
2009-10-12 11:19 ` David Miller
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).