Browse Source

qcacmn: Fix Operands size in a bitwise operation

Bitwise operation on different operands size may lead
to unexpected results, Typecast the constant to
the size of the variable while performing the bitwise
operation.

Change-Id: Ifd9939905cc9df22bb249fa9b1a6a9670cf5f113
CRs-fixed: 2047880
Anurag Chouhan 8 years ago
parent
commit
656ec600ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qdf/linux/src/i_qdf_lock.h

+ 1 - 1
qdf/linux/src/i_qdf_lock.h

@@ -295,7 +295,7 @@ static inline void __qdf_spin_lock_bh(__qdf_spinlock_t *lock)
 static inline void __qdf_spin_unlock_bh(__qdf_spinlock_t *lock)
 {
 	if (unlikely(lock->flags & QDF_LINUX_UNLOCK_BH)) {
-		lock->flags &= ~QDF_LINUX_UNLOCK_BH;
+		lock->flags &= (unsigned long)~QDF_LINUX_UNLOCK_BH;
 		spin_unlock_bh(&lock->spinlock);
 	} else
 		spin_unlock(&lock->spinlock);