qcacmn: Fix negative shift operand

Fix to avoid negative shift.

Change-Id: Idff0836e7e5ded0aeca400b057790df26c1c67fd
CRs-Fixed: 3609048
This commit is contained in:
Karunakar Dasineni
2023-09-06 14:44:34 -07:00
committed by Rahul Choudhary
parent 29b3272233
commit 6bb232bd38

View File

@@ -1465,6 +1465,8 @@ static inline int dp_log2_ceil(unsigned int value)
unsigned int tmp = value;
int log2 = -1;
if (qdf_unlikely(value == 0))
return 0;
while (tmp) {
log2++;
tmp >>= 1;