From: Kalesh AP Date: Mon, 14 Apr 2014 10:42:41 +0000 (+0530) Subject: be2net: Fix invocation of be_close() after be_clear() X-Git-Tag: omap-for-v3.16/pm-signed~106^2~16^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1ad8e33d2e57ca64d9862b63d986fc296a7b876;p=pandora-kernel.git be2net: Fix invocation of be_close() after be_clear() In the EEH error recovery path, when a permanent failure occurs, we clean up adapter structure (i.e. destroy queues etc) by calling be_clear() and return PCI_ERS_RESULT_DISCONNECT. After this the stack tries to remove device from bus and calls be_remove() which invokes netdev_unregister()->be_close(). be_close() operating on destroyed queues results in a NULL dereference. This patch fixes this problem by introducing a flag to keep track of the setup state. Signed-off-by: Kalesh AP Signed-off-by: Sathya Perla Signed-off-by: David S. Miller --- Reading git-diff-tree failed