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

Commit ea842bf7 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: fix iterating through misc offset for capabilities"

parents ad302b00 cf16d76c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ extern struct bus_type mhi_bus_type;

/* MHI mmio register mapping */
#define PCI_INVALID_READ(val) (val == U32_MAX)
#define MHI_REG_SIZE (SZ_4K)

#define MHIREGLEN (0x0)
#define MHIREGLEN_MHIREGLEN_MASK (0xFFFFFFFF)
+4 −2
Original line number Diff line number Diff line
@@ -81,7 +81,9 @@ int mhi_get_capability_offset(struct mhi_controller *mhi_cntrl,
		if (ret)
			return ret;

		*offset += next_offset;
		*offset = next_offset;
		if (*offset >= MHI_REG_SIZE)
			return -ENXIO;
	} while (next_offset);

	return -ENXIO;
@@ -1241,7 +1243,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl,
			break;
		}
		default:
			MHI_ASSERT(1, "Unsupported ev type");
			MHI_ERR("Unhandled Event: 0x%x\n", type);
			break;
		}