Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c558b1f authored by Zijun Zhao's avatar Zijun Zhao Committed by Android (Google) Code Review
Browse files

Revert "RESTRICT AUTOMERGE: Fix the error and make the argument nonnull"

This reverts commit 5dbd147f.

Reason for revert: this argument will be corrected as null_unspecified

Change-Id: I074b8a55819b213001c072f79aacc1980771a858
parent 5dbd147f
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -362,12 +362,10 @@ int MtpFfsHandle::waitEvents(struct io_buffer *buf, int min_events, struct io_ev


void MtpFfsHandle::cancelTransaction() {
void MtpFfsHandle::cancelTransaction() {
    // Device cancels by stalling both bulk endpoints.
    // Device cancels by stalling both bulk endpoints.
    void *buf = malloc(sizeof(char));
    if (::read(mBulkIn, nullptr, 0) != -1 || errno != EBADMSG)
    if (::read(mBulkIn, buf, 0) != -1 || errno != EBADMSG)
        PLOG(ERROR) << "Mtp stall failed on bulk in";
        PLOG(ERROR) << "Mtp stall failed on bulk in";
    if (::write(mBulkOut, buf, 0) != -1 || errno != EBADMSG)
    if (::write(mBulkOut, nullptr, 0) != -1 || errno != EBADMSG)
        PLOG(ERROR) << "Mtp stall failed on bulk out";
        PLOG(ERROR) << "Mtp stall failed on bulk out";
    free(buf);
    mCanceled = true;
    mCanceled = true;
    errno = ECANCELED;
    errno = ECANCELED;
}
}