diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-01-13 11:25:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-13 18:46:19 -0500 |
commit | c1cd14974c427935fe37d9f087da24d07a2f5eb7 (patch) | |
tree | 1641fcfc48d2192ba5bf86564bfc2a4df08c1c84 | |
parent | 9010a286d9857fccfac69e5e8bdf9b74ea1f7c0e (diff) |
staging: vt6656: sparse fixes: iwctl_giwgenie use memcpy.
extra is in kernel space use memcpy.
sparse warning
iwctl.c:1595:42: warning: incorrect type in argument 1 (different address spaces)
iwctl.c:1595:42: expected void [noderef] <asn:1>*to
iwctl.c:1595:42: got char *extra
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vt6656/iwctl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index bf5687708e18..3a68dfa23d84 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c | |||
@@ -1591,13 +1591,11 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info, | |||
1591 | wrq->length = 0; | 1591 | wrq->length = 0; |
1592 | if (pMgmt->wWPAIELen > 0) { | 1592 | if (pMgmt->wWPAIELen > 0) { |
1593 | wrq->length = pMgmt->wWPAIELen; | 1593 | wrq->length = pMgmt->wWPAIELen; |
1594 | if (pMgmt->wWPAIELen <= space) { | 1594 | |
1595 | if (copy_to_user(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen)) { | 1595 | if (pMgmt->wWPAIELen <= space) |
1596 | ret = -EFAULT; | 1596 | memcpy(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen); |
1597 | } | 1597 | else |
1598 | } else { | ||
1599 | ret = -E2BIG; | 1598 | ret = -E2BIG; |
1600 | } | ||
1601 | } | 1599 | } |
1602 | return ret; | 1600 | return ret; |
1603 | } | 1601 | } |