]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: clean up on error in ath12k_dp_setup()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 18 Dec 2025 07:44:20 +0000 (10:44 +0300)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Fri, 16 Jan 2026 01:19:36 +0000 (17:19 -0800)
Destroy the rhash_tbl before returning the error code.

Fixes: a88cf5f71adf ("wifi: ath12k: Add hash table for ath12k_dp_link_peer")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/aUOw1J0TU4VgeXj6@stanley.mountain
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp.c

index 9f05eea6695a5fb65064c4abd2a7c06eb1378622..ab54c8a84d3e0843e5604c556742dc60afbb89fe 100644 (file)
@@ -1513,7 +1513,7 @@ static int ath12k_dp_setup(struct ath12k_base *ab)
                                        HAL_WBM_IDLE_LINK, srng, n_link_desc);
        if (ret) {
                ath12k_warn(ab, "failed to setup link desc: %d\n", ret);
-               return ret;
+               goto rhash_destroy;
        }
 
        ret = ath12k_dp_cc_init(ab);