]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
starfire: clean up properly if firmware loading fails
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 26 Jan 2010 18:27:09 +0000 (18:27 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Feb 2010 12:51:00 +0000 (04:51 -0800)
commit35cfb03de1dcd87f405db30a9da65bd63bfa59fe
tree7e03972e2fc5fd19c65ea15e3f01e7442fb854da
parent906f68dd91cc512036909a10350d479dfc56d378
starfire: clean up properly if firmware loading fails

commit c928febf4bc703ea542340e5a208e0445d998839 upstream.

netdev_open() will return without cleaning up net device or hardware state
if firmware loading fails.  This results in a BUG() on a second attempt to
bring the interface up, reported in
<http://bugzilla.kernel.org/show_bug.cgi?id=15091>, and probably has even
worse effects if the driver is removed afterwards.

Call netdev_close() to clean up on failure.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15091

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Reported-by: Michael Moffatt <michael@moffatt.org.nz>
Tested-by: Michael Moffatt <michael@moffatt.org.nz>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/starfire.c