From 9e66fc56016b9a8f99917180b660441778038e4a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 25 Sep 2003 09:13:20 -0700 Subject: [PATCH] [BLUETOOTH]: Remove unneeded verify_area call (from domen@coderock.org) --- net/bluetooth/hci_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 61ef81847c8dc..272536a80ba26 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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; -- 2.53.0