Skip to content

Commit 6d0dc85

Browse files
committed
Merge tag 'soc-fixes-6.7-3a' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
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
2 parents 7987b8b + 643fe70 commit 6d0dc85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/arm/mach-sunxi/mc_smp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,16 +803,16 @@ static int __init sunxi_mc_smp_init(void)
803803
for (i = 0; i < ARRAY_SIZE(sunxi_mc_smp_data); i++) {
804804
ret = of_property_match_string(node, "enable-method",
805805
sunxi_mc_smp_data[i].enable_method);
806-
if (!ret)
806+
if (ret >= 0)
807807
break;
808808
}
809809

810-
is_a83t = sunxi_mc_smp_data[i].is_a83t;
811-
812810
of_node_put(node);
813-
if (ret)
811+
if (ret < 0)
814812
return -ENODEV;
815813

814+
is_a83t = sunxi_mc_smp_data[i].is_a83t;
815+
816816
if (!sunxi_mc_smp_cpu_table_init())
817817
return -EINVAL;
818818

0 commit comments

Comments
 (0)