mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
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>
This commit is contained in:
parent
1c5ebaae42
commit
3b371fe4d2
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue