2014-09-04 22:09:28

by Malcolm Priestley

[permalink] [raw]
Subject: [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)

Reported-by: Dan Carpenter <[email protected]>
Cc: [email protected]
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/device_main.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index f33795f..7e7d9af 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -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);
--
1.9.1



2014-09-04 22:09:33

by Malcolm Priestley

[permalink] [raw]
Subject: [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.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/main_usb.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 422fcba..2fbff90 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -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);
--
1.9.1