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

Commit 7d0be499 authored by Ravi Aravamudhan's avatar Ravi Aravamudhan
Browse files

diag: Set the log mask item number correctly



Diag driver was setting the value of item number for a log equipment
id incorrectly. The item number should be set to the minimum of
the number of supported items and the requested items.

Change-Id: I558d4af14c2eefb0c53e432ed9056ca15406aa7d
Signed-off-by: default avatarRavi Aravamudhan <aravamud@codeaurora.org>
parent f19ef0f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -914,7 +914,7 @@ static int diag_cmd_set_log_mask(unsigned char *src_buf, int src_len,
	for (i = 0; i < MAX_EQUIP_ID && !status; i++, mask++) {
		if (mask->equip_id != req->equip_id)
			continue;
		if (mask->num_items < req->num_items)
		if (req->num_items < mask->num_items)
			mask->num_items = req->num_items;
		mask_size = LOG_ITEMS_TO_SIZE(req->num_items);
		if (mask_size > mask->range) {