diff options
| author | Martin Berglund <martin@rogsta.net> | 2014-08-08 02:08:34 +0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-16 23:23:15 +0400 |
| commit | effda6973dba27d80a669855603bdc0971f89449 (patch) | |
| tree | 2a9398bffe5d6f595d5b25a3d53c6b336d98f1c4 | |
| parent | 2160e944a911dae3c4b40cca72d6c83af6f85bb5 (diff) | |
| download | linux-effda6973dba27d80a669855603bdc0971f89449.tar.xz | |
staging: vt6655: wpactl.c: Fix sparse warnings
Add missing __user macro casting in the function wpa_set_keys.
This is okay since the function handles the possibility of
param->u.wpa_key.key and param->u.wpa_key.seq pointing to
kernelspace using a flag, fcpfkernel.
Signed-off-by: Martin Berglund <martin@rogsta.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/vt6655/wpactl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 5f454ca2a3bc..d75dd797bd9e 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -224,7 +224,9 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, } else { spin_unlock_irq(&pDevice->lock); if (param->u.wpa_key.key && - copy_from_user(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len)) { + copy_from_user(&abyKey[0], + (void __user *)param->u.wpa_key.key, + param->u.wpa_key.key_len)) { spin_lock_irq(&pDevice->lock); return -EINVAL; } @@ -262,7 +264,9 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, } else { spin_unlock_irq(&pDevice->lock); if (param->u.wpa_key.seq && - copy_from_user(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len)) { + copy_from_user(&abySeq[0], + (void __user *)param->u.wpa_key.seq, + param->u.wpa_key.seq_len)) { spin_lock_irq(&pDevice->lock); return -EINVAL; } |
