Fix to avoid negative shift. Change-Id: Idff0836e7e5ded0aeca400b057790df26c1c67fd CRs-Fixed: 3609048
@@ -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;