summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-01-03 23:59:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-08 11:02:13 -0800
commit3b371fe4d27bcf208f7a211c372e0b8a9253d7c8 (patch)
tree10ac432a325d1e5da71b3be7e7c28dcd4fa96aee /drivers
parent1c5ebaae42793308870cb38fc81f5217ee49e691 (diff)
staging: vt6656: remove an unneeded NULL check
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/vt6656/wpactl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c
index 003bd7c614e5..f4a8a5cb9feb 100644
--- a/drivers/staging/vt6656/wpactl.c
+++ b/drivers/staging/vt6656/wpactl.c
@@ -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);