qcacld-3.0: Fix an improper trial spin lock acquiring

Return value of __netif_tx_trylock should be checked immediately
after being invoked, any subsequenct actions designated to the
atomic context should be abandoned if trial acquiring of the
spin lock fails

Change-Id: I95504eed14c3e30d014aa1ccc23356a7df02fb00
CRs-Fixed: 2047246
Dieser Commit ist enthalten in:
wadesong
2017-05-15 20:59:05 +08:00
committet von snandini
Ursprung 6c5d3df31c
Commit ba6373eb7d

Datei anzeigen

@@ -1321,14 +1321,13 @@ static void wlan_hdd_update_txq_timestamp(struct net_device *dev)
{
struct netdev_queue *txq;
int i;
bool unlock;
for (i = 0; i < NUM_TX_QUEUES; i++) {
txq = netdev_get_tx_queue(dev, i);
unlock = __netif_tx_trylock(txq);
txq_trans_update(txq);
if (unlock == true)
if (__netif_tx_trylock(txq)) {
txq_trans_update(txq);
__netif_tx_unlock(txq);
}
}
}