Quellcode durchsuchen

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
Rajeev Kumar Sirasanagandla vor 8 Jahren
Ursprung
Commit
92cf0523d8
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      qdf/linux/src/i_qdf_util.h

+ 1 - 1
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)