From ba4684c2b2bc952748ebbe176b292a6d263e4dc8 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 24 Jun 2019 14:36:01 -0700 Subject: [PATCH] Revert "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor" This reverts commit b2d79c5e48684d3859481bcca0e967fc4021db12. Bug: http://b/135753060 Test: treehugger Change-Id: I2b1b2b7dfb7bab783e4ed40e295329525ceaa0dd --- adb/daemon/usb_ffs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/daemon/usb_ffs.cpp b/adb/daemon/usb_ffs.cpp index 954e53015..07b4ba898 100644 --- a/adb/daemon/usb_ffs.cpp +++ b/adb/daemon/usb_ffs.cpp @@ -257,7 +257,6 @@ bool open_functionfs(android::base::unique_fd* out_control, android::base::uniqu } // Signal only when writing the descriptors to ffs android::base::SetProperty("sys.usb.ffs.ready", "1"); - *out_control = std::move(control); } bulk_out.reset(adb_open(USB_FFS_ADB_OUT, O_RDONLY)); @@ -272,6 +271,7 @@ bool open_functionfs(android::base::unique_fd* out_control, android::base::uniqu return false; } + *out_control = std::move(control); *out_bulk_in = std::move(bulk_in); *out_bulk_out = std::move(bulk_out); return true;