All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath:Release resources for structure pointer, ar if error pointing device in the function, ath10k_core_register_work
@ 2015-03-03  2:36 ` Nicholas Krause
  0 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2015-03-03  2:36 UTC (permalink / raw)
  To: kvalo; +Cc: netdev, linux-wireless, linux-kernel, ath10k

Releases resources and deregisters the stucture pointer ar passed by the caller to the function, ath10k_core_register_work
if unable to probe the structure pointer successfully with a call to ath10k_core_probe_fw. Further more if this happerns
we must first jump to the label err for the goto statement required to jump to handle this particular error in the function,
ath10k_core_register_work.  After we are in the correct error section we must free the resources for the structure pointer,ar
with a call to the function,  ath10k_core_unregister to free resources allocated for the structure pointer,ar.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 310e12b..8b2ca25 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1307,9 +1307,7 @@ err_unregister_mac:
 err_release_fw:
 	ath10k_core_free_firmware_files(ar);
 err:
-	/* TODO: It's probably a good idea to release device from the driver
-	 * but calling device_release_driver() here will cause a deadlock.
-	 */
+	ath10k_core_unregister(ar);
 	return;
 }
 
-- 
2.1.0


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-03 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03  2:36 [PATCH] ath:Release resources for structure pointer, ar if error pointing device in the function, ath10k_core_register_work Nicholas Krause
2015-03-03  2:36 ` Nicholas Krause
2015-03-03  6:40 ` Michal Kazior
2015-03-03  6:40   ` Michal Kazior
2015-03-03 18:21   ` nick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.