From nobody Mon Jun 8 18:58:48 2026 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 234A23F410F for ; Wed, 27 May 2026 10:59:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779879594; cv=none; b=psYCEn55SEnW8JtW4zoNZ9eH1Q7Wg/EMmU2KBZpqVKsgrF9a0b4qPVV5/A5jdT7I2ViuGSxoxBFaVVauv+CyFHUv9uAhu5myPLcKusbQDlskCA/9hDjB4mvV0xoztYJSPmd4iYypJklh/30+Lk8XhZjCktvzn6m4IW9t2AsWoJI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779879594; c=relaxed/simple; bh=r/vBW/73cTPQbt4ZjCg8F+UPo7SfnMkqusYD3q/UAEM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=EXoBA2nslqWR4qWURtofhG9X19Do1YxZtlTja1GDSLgcMAfRjiOInh4cjyouE0bPorpmoyZ110UEisIg0GmzP01wDG04oYIhNKoMNIhr21h0aMBgRvyPgDCJMw91Xaw8DA/wm9HxEaELMb42BE3+2wl2tA0FJm4+HJFFtbrDBts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 283aa34c59bb11f1aa26b74ffac11d73-20260527 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:5c1ddc5f-385d-4c45-a20c-5e105335c24b,IP:0,U RL:0,TC:0,Content:-5,EDM:-25,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-30 X-CID-META: VersionHash:e7bac3a,CLOUDID:36b8ed42d9611f943c4d82481743fdd7,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|850|865|898,TC:nil,Content:0|15|50,E DM:2,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA: 0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 283aa34c59bb11f1aa26b74ffac11d73-20260527 X-User: lijun01@kylinos.cn Received: from localhost.localdomain [(10.44.16.150)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 568183387; Wed, 27 May 2026 18:59:39 +0800 From: Li Jun To: lijun01@kylinos.cn, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm: mach: fix missing NULL checks and memory leaks in DT property setup Date: Wed, 27 May 2026 18:59:37 +0800 Message-Id: <20260527105937.3570122-1-lijun01@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Check kstrdup returns, free p on failure. Signed-off-by: Li Jun --- arch/arm/mach-mvebu/coherency.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherenc= y.c index 7234d487ff39..aa09a829b1db 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -192,6 +192,10 @@ static void __init armada_375_380_coherency_init(struc= t device_node *np) =20 p =3D kzalloc_obj(*p); p->name =3D kstrdup("arm,io-coherent", GFP_KERNEL); + if (!p->name) { + kfree(p); + return; + } of_add_property(cache_dn, p); } } --=20 2.25.1