coresight-tmc: Ignore USB write errors during disconnection

When USB sink path is disabled or disconnected, it is expected that
the outstanding write requests will return with an error code.
Ignore -ECONNRESET and -ESHUTDOWN for those respective cases to
avoid printing an error message to the kernel log.

Change-Id: Ia9a886b082e3152cfd1ccf315a678c1b48347b05
Signed-off-by: Jack Pham <quic_jackp@quicinc.com>
This commit is contained in:
Jack Pham 2021-11-28 20:39:33 -08:00 committed by Gerrit - the friendly Code Review server
parent 2b0465b6c3
commit f70386b916

View File

@ -318,7 +318,8 @@ static void usb_write_done(struct byte_cntr *drvdata,
struct qdss_request *d_req)
{
atomic_inc(&drvdata->usb_free_buf);
if (d_req->status)
if (d_req->status && d_req->status != -ECONNRESET
&& d_req->status != -ESHUTDOWN)
pr_err_ratelimited("USB write failed err:%d\n", d_req->status);
kfree(d_req->sg);
kfree(d_req);