From: Govind Singh Date: Wed, 13 Jun 2018 06:48:06 +0000 (+0530) Subject: ath10k: handle resource init failure case X-Git-Tag: v4.19-rc1~140^2~277^2~48^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d16a7ab20ac9861979c83d7fce8f5edc48daada6;p=thirdparty%2Fkernel%2Flinux.git ath10k: handle resource init failure case Return type of resource init method is not assigned. Handle resource init failures for graceful exit. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index f3db08d988104..fa1843a7e0fda 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -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;