Commit c1cd1497 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

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: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9010a286
...@@ -1591,14 +1591,12 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info, ...@@ -1591,14 +1591,12 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
wrq->length = 0; wrq->length = 0;
if (pMgmt->wWPAIELen > 0) { if (pMgmt->wWPAIELen > 0) {
wrq->length = pMgmt->wWPAIELen; wrq->length = pMgmt->wWPAIELen;
if (pMgmt->wWPAIELen <= space) {
if (copy_to_user(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen)) { if (pMgmt->wWPAIELen <= space)
ret = -EFAULT; memcpy(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen);
} else
} else {
ret = -E2BIG; ret = -E2BIG;
} }
}
return ret; return ret;
} }
......
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