Commit 9e66fc56 authored by Randy Dunlap's avatar Randy Dunlap Committed by David S. Miller

[BLUETOOTH]: Remove unneeded verify_area call (from domen@coderock.org)

parent c6f03202
......@@ -434,11 +434,11 @@ int hci_inquiry(unsigned long arg)
BT_DBG("num_rsp %d", ir.num_rsp);
if (!verify_area(VERIFY_WRITE, ptr, sizeof(ir) +
(sizeof(struct inquiry_info) * ir.num_rsp))) {
copy_to_user(ptr, &ir, sizeof(ir));
if (!copy_to_user(ptr, &ir, sizeof(ir))) {
ptr += sizeof(ir);
copy_to_user(ptr, buf, sizeof(struct inquiry_info) * ir.num_rsp);
if (copy_to_user(ptr, buf, sizeof(struct inquiry_info) *
ir.num_rsp))
err = -EFAULT;
} else
err = -EFAULT;
......
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