From 92cf0523d8701344fea28f438822863cb7b7cef5 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Fri, 19 Aug 2016 18:47:26 +0530 Subject: [PATCH] qcacmn: Modify __qdf_assert to invoke QDF_BUG Currently, __qdf_assert is doing kernel panic, deviating the purpose of assert - "Asserts are NOT used for stopping a program in case of an error". To address this, modify __qdf_assert to invoke QDF_BUG which in turn warns or crashes based on the macro PANIC_ON_BUG. Change-Id: Ie62484f8f369d8aafa3b1970feafe556b2c94ffa CRs-Fixed: 1015603 --- qdf/linux/src/i_qdf_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qdf/linux/src/i_qdf_util.h b/qdf/linux/src/i_qdf_util.h index 1cfb71614232..9894e1c2a368 100644 --- a/qdf/linux/src/i_qdf_util.h +++ b/qdf/linux/src/i_qdf_util.h @@ -203,7 +203,7 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1, pr_err("Assertion failed! %s:%s %s:%d\n", \ # expr, __func__, __FILE__, __LINE__); \ dump_stack(); \ - BUG_ON(1); \ + QDF_BUG(0); \ } \ } while (0)