From: Dan Carpenter Date: Tue, 5 Jun 2012 20:31:29 +0000 (+0000) Subject: net/ethernet: ks8851_mll unregister_netdev() before freeing X-Git-Tag: v3.6-rc1~125^2~592 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3001b773bb63afd403bae37febf3f09826912cb;p=pandora-kernel.git net/ethernet: ks8851_mll unregister_netdev() before freeing We added another error condition here, but if we were to hit it then we need to unregister_netdev() before doing the free_netdev(). Otherwise we would hit the BUG_ON() in free_netdev(): BUG_ON(dev->reg_state != NETREG_UNREGISTERED); Signed-off-by: Dan Carpenter Tested-by: Raffaele Recalcati Signed-off-by: David S. Miller --- Reading git-diff-tree failed