Commit 6d0dc855 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ARM SoC fixes from Arnd Bergmann:
 "These are two correctness fixes for handing DT input in the
  Allwinner (sunxi) SMP startup code"

* tag 'soc-fixes-6.7-3a' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: sun9i: smp: fix return code check of of_property_match_string
  ARM: sun9i: smp: Fix array-index-out-of-bounds read in sunxi_mc_smp_init
parents 7987b8b7 643fe70e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -803,16 +803,16 @@ static int __init sunxi_mc_smp_init(void)
	for (i = 0; i < ARRAY_SIZE(sunxi_mc_smp_data); i++) {
		ret = of_property_match_string(node, "enable-method",
					       sunxi_mc_smp_data[i].enable_method);
		if (!ret)
		if (ret >= 0)
			break;
	}

	is_a83t = sunxi_mc_smp_data[i].is_a83t;

	of_node_put(node);
	if (ret)
	if (ret < 0)
		return -ENODEV;

	is_a83t = sunxi_mc_smp_data[i].is_a83t;

	if (!sunxi_mc_smp_cpu_table_init())
		return -EINVAL;