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

Commit 09b7b1dd authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3: debugfs: Add missing in_lpm check



dwc->in_lpm check is missing from dwc3_tx_request_queue_show
function. Calling it can lead to unclocked access of DWC3
register. Fix it by adding the missing check.

Change-Id: I7fac7f3bc0187636b7bc79dd241ec5fa29aa648c
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 01dafb76
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -602,6 +602,11 @@ static int dwc3_tx_request_queue_show(struct seq_file *s, void *unused)
	unsigned long		flags;
	u32			val;

	if (atomic_read(&dwc->in_lpm)) {
		seq_puts(s, "USB device is powered off\n");
		return 0;
	}

	spin_lock_irqsave(&dwc->lock, flags);
	val = dwc3_core_fifo_space(dep, DWC3_TXREQQ);
	seq_printf(s, "%u\n", val);