Search Linux Wireless

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

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

 



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 <dan.carpenter@xxxxxxxxxx>
Cc: kbuild@xxxxxx
Signed-off-by: Malcolm Priestley <tvboxspy@xxxxxxxxx>
---
 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

--
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