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

Commit 5fa6ccab authored by Sujeev Dias's avatar Sujeev Dias
Browse files

mhi: dev: uci: exit immediately if MHI channel is in disabled state



If write thread woke up because device is in a disabled state,
exit immediately and return error to user.

CRs-Fixed: 2258304
Change-Id: I7de224e29d0ef9b414a014ef0d874156367d0cb6
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent dc139576
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -278,8 +278,8 @@ static ssize_t mhi_uci_write(struct file *file,
			(nr_avail = mhi_get_no_free_descriptors(mhi_dev,
							DMA_TO_DEVICE)) > 0);

		if (ret == -ERESTARTSYS) {
			MSG_LOG("Exit signal caught for node\n");
		if (ret == -ERESTARTSYS || !uci_dev->enabled) {
			MSG_LOG("Exit signal caught for node or not enabled\n");
			return -ERESTARTSYS;
		}