]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Jan 2010 05:05:25 +0000 (21:05 -0800)
commitd2662288024d30863f8aebbfb9ad045a54837502
treeb43875f67bca052b4e5826eae5d2d9f45c5edb67
parent5d8b976b9b6bf01ee025f23466e93a5436fbfacd
starfire: clean up properly if firmware loading fails

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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/starfire.c