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

Commit 49522099 authored by Sreelakshmi Gownipalli's avatar Sreelakshmi Gownipalli Committed by Gerrit - the friendly Code Review server
Browse files

diag: Check for the peripheral limits for the pd



Check for the perpheral limits while fetching peripheral information
from the pd before sending the non real time mode control packet
to the peripheral.

Change-Id: Iad8b2d12f8f8e83342bf299cb43b5e5dbb12c608
Signed-off-by: default avatarSreelakshmi Gownipalli <sgownipa@codeaurora.org>
parent a275d6d4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1139,6 +1139,9 @@ void diag_real_time_work_fn(struct work_struct *work)
		if (peripheral > NUM_PERIPHERALS)
			peripheral = diag_search_peripheral_by_pd(i);

		if (peripheral < 0 || peripheral > NUM_PERIPHERALS)
			continue;

		if (!driver->feature[peripheral].peripheral_buffering)
			continue;
		switch (driver->buffering_mode[i].mode) {