staging: vt6656: remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 3 Jan 2014 20:59:41 +0000 (23:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2014 19:02:13 +0000 (11:02 -0800)
We dereference "param->u.wpa_key.key" on the next line so the check
here is inconsistent.  This is only called from iwctl_siwencodeext() and
"param->u.wpa_key.key" is a valid pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/wpactl.c

index 003bd7c614e5f726b9e94109ebef08391dec260c..f4a8a5cb9feb14671cb1f350201ed889ab05884b 100644 (file)
@@ -86,7 +86,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
                return ret;
        }
 
-       if (param->u.wpa_key.key && param->u.wpa_key.key_len > sizeof(abyKey))
+       if (param->u.wpa_key.key_len > sizeof(abyKey))
                return -EINVAL;
 
        memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);