Skip to content

Commit

Permalink
ath10k: handle resource init failure case
Browse files Browse the repository at this point in the history
Return type of resource init method is not assigned.
Handle resource init failures for graceful exit.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Govind Singh authored and Kalle Valo committed Jun 14, 2018
1 parent 5db98ae commit d16a7ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath10k/snoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,13 +1304,13 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
ar_snoc->ce.bus_ops = &ath10k_snoc_bus_ops;
ar->ce_priv = &ar_snoc->ce;

ath10k_snoc_resource_init(ar);
ret = ath10k_snoc_resource_init(ar);
if (ret) {
ath10k_warn(ar, "failed to initialize resource: %d\n", ret);
goto err_core_destroy;
}

ath10k_snoc_setup_resource(ar);
ret = ath10k_snoc_setup_resource(ar);
if (ret) {
ath10k_warn(ar, "failed to setup resource: %d\n", ret);
goto err_core_destroy;
Expand Down

0 comments on commit d16a7ab

Please sign in to comment.