Skip to contentSkip to conversation

staging: vt6655: device_free_info() warn: variable dereferenced before check

PATCH New Malcolm Priestley 1 participant 2 messages Sep 4, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: vt6655: device_free_info() warn: variable dereferenced before check

pDevice is never NULL when this function is called remove the check.

This fixes smatch warning
drivers/staging/vt6655/device_main.c:1023 device_free_info() warn: variable dereferenced before check 'pDevice' (see line 1021)

---
 drivers/staging/vt6655/device_main.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/vt6655/device_main.c +0 -3
index f33795f..7e7d9af 100644
@@ -1008,9 +1008,6 @@ static void device_free_info(struct vnt_private *pDevice)
 {
 	struct net_device *dev = pDevice->dev;
 
-	if (!pDevice)
-		return;
-
 	ASSERT(pDevice);
 //2008-0714-01<Add>by chester
 	device_release_WPADEV(pDevice);
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 staging: vt6656: remove rate_control_algorithm pid

rate control algorithm pid was removed from wireless tree

The device defaults to algorithm 'minstrel_ht'

There has been no problems using this algorithm.

---
 drivers/staging/vt6656/main_usb.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/vt6656/main_usb.c +0 -1
index 422fcba..2fbff90 100644
@@ -993,7 +993,6 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
 		IEEE80211_HW_SIGNAL_DBM |
 		IEEE80211_HW_TIMING_BEACON_ONLY;
 
-	priv->hw->rate_control_algorithm = "pid";
 	priv->hw->max_signal = 100;
 
 	SET_IEEE80211_DEV(priv->hw, &intf->dev);
Signature · 1 line
1.9.1