acenic: Pass up error code from ace_load_firmware()
authorBen Hutchings <[email protected]>
Mon, 12 Oct 2009 11:18:48 +0000 (04:18 -0700)
committerDavid S. Miller <[email protected]>
Mon, 12 Oct 2009 11:18:48 +0000 (04:18 -0700)
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/acenic.c

index 5f0b05c2d71fbe64f4699394f88b621c214bf2df..d82a9a994753c2a8061bd5102be797767bcaf2b6 100644 (file)
@@ -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;