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

Commit d6cf7b59 authored by Russell King - ARM Linux's avatar Russell King - ARM Linux Committed by Dan Williams
Browse files

ARM: PL08x: use min() to calculate target_len

parent b61be8d7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -682,9 +682,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
			 * If enough left try to send max possible,
			 * otherwise try to send the remainder
			 */
			target_len = remainder;
			if (remainder > max_bytes_per_lli)
				target_len = max_bytes_per_lli;
			target_len = min(remainder, max_bytes_per_lli);

			/*
			 * Set bus lengths for incrementing buses