projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.samba.org/sfrench/cifs-2.6
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
staging
/
vt6656
/
ioctl.c
diff --git
a/drivers/staging/vt6656/ioctl.c
b/drivers/staging/vt6656/ioctl.c
index 1463d76895f023fe339d3ea8cf3a67a16544706f..d59456c29df15db61b310281841c16164e6cc4dc 100644
(file)
--- a/
drivers/staging/vt6656/ioctl.c
+++ b/
drivers/staging/vt6656/ioctl.c
@@
-565,7
+565,7
@@
int private_ioctl(PSDevice pDevice, struct ifreq *rq)
result = -ENOMEM;
break;
}
result = -ENOMEM;
break;
}
- pNodeList =
(PSNodeList)
kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
+ pNodeList = kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
if (pNodeList == NULL) {
result = -ENOMEM;
break;
if (pNodeList == NULL) {
result = -ENOMEM;
break;
@@
-601,6
+601,7
@@
int private_ioctl(PSDevice pDevice, struct ifreq *rq)
}
}
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
}
}
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
+ kfree(pNodeList);
result = -EFAULT;
break;
}
result = -EFAULT;
break;
}