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

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

Merge "diag: Check for the peripheral limits for the pd"

parents 0204cde8 d75aa40c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/slab.h>
@@ -1131,6 +1131,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) {