Search Linux Wireless

re: wlcore/wl12xx: change GEM Tx-spare blocks per-vif

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Arik Nemtsov,

This is a semi-automatic email about new static checker warnings.

The patch 3edab305dfd4: "wlcore/wl12xx: change GEM Tx-spare blocks 
per-vif" from Dec 7, 2011, leads to the following Smatch complaint:

drivers/net/wireless/ti/wlcore/tx.c:231 wl1271_tx_allocate()
	 warn: variable dereferenced before check 'wlvif' (see line 208)

drivers/net/wireless/ti/wlcore/tx.c
   207		else if (wlvif->is_gem)
                         ^^^^^^^^^^^^^
New dereference.

   208			spare_blocks = wl->gem_tx_spare;
   209	
   210		total_blocks = wlcore_hw_calc_tx_blocks(wl, total_len, spare_blocks);
   211	
   212		if (total_blocks <= wl->tx_blocks_available) {
   213			desc = (struct wl1271_tx_hw_descr *)skb_push(
   214				skb, total_len - skb->len);
   215	
   216			wlcore_hw_set_tx_desc_blocks(wl, desc, total_blocks,
   217						     spare_blocks);
   218	
   219			desc->id = id;
   220	
   221			wl->tx_blocks_available -= total_blocks;
   222			wl->tx_allocated_blocks += total_blocks;
   223	
   224			/* If the FW was empty before, arm the Tx watchdog */
   225			if (wl->tx_allocated_blocks == total_blocks)
   226				wl12xx_rearm_tx_watchdog_locked(wl);
   227	
   228			ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb));
   229			wl->tx_allocated_pkts[ac]++;
   230	
   231			if (!is_dummy && wlvif &&
                                         ^^^^^
Old check.

   232			    wlvif->bss_type == BSS_TYPE_AP_BSS &&
   233			    test_bit(hlid, wlvif->ap.sta_hlid_map))

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux