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

Commit 4a8ee505 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: cdc-acm: do not update PM busy on read errors



There's no need to update the runtime PM last_busy field on read urb
errors (e.g. when the urb is being killed on shutdown).

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1d42efc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -416,13 +416,15 @@ static void acm_read_bulk_callback(struct urb *urb)
		dev_dbg(&acm->data->dev, "%s - disconnected\n", __func__);
		return;
	}
	usb_mark_last_busy(acm->dev);

	if (urb->status) {
		dev_dbg(&acm->data->dev, "%s - non-zero urb status: %d\n",
							__func__, urb->status);
		return;
	}

	usb_mark_last_busy(acm->dev);

	acm_process_read_urb(acm, urb);

	/* throttle device if requested by tty */