Commit 3b371fe4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c5ebaae
...@@ -86,7 +86,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) ...@@ -86,7 +86,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
return ret; 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; return -EINVAL;
memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len); memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment