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

Commit e5225ad6 authored by Jishnu Prakash's avatar Jishnu Prakash
Browse files

qcom: fg-memif: Correct timeout condition for memory grant



Correct logic to handle timeout when trying for DMA access.

Change-Id: I10e55e542a96b824db9f7b2abd3fef86286eac6b
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent d81e600c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -778,7 +778,7 @@ int fg_dma_mem_req(struct fg_chip *chip, bool request)
				break;
			msleep(20);
		}
		if (!retry_count && !(val & MEM_GNT_BIT)) {
		if ((retry_count < 0) && !(val & MEM_GNT_BIT)) {
			pr_err("failed to get memory access\n");
			rc = -ETIMEDOUT;
			goto release_mem;