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

Commit 45cdd473 authored by Roel Kluin's avatar Roel Kluin Committed by Hirokazu Takata
Browse files

m32r: Should index be positive?



Index `ipi_num' is signed, test whether it is negative to
make sure we don't get a negative array element.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
parent 337214e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -806,7 +806,7 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num,

	if (mask & ~physids_coerce(phys_cpu_present_map))
		BUG();
	if (ipi_num >= NR_IPIS)
	if (ipi_num >= NR_IPIS || ipi_num < 0)
		BUG();

	mask <<= IPI_SHIFT;