From nobody Sat Jul 25 21:59:35 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 3C4993B0AEF for ; Mon, 13 Jul 2026 08:29:21 +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=1783931365; cv=none; b=J90S3fD1OTI2ttNlwmLVyPu/t14gjDJoOgKzWbLa/0ClRoSwF0b5wEbwf3tPmAlBwHbxKu4BMV3uoBVwwA2bhEE3XdBYwNCEla5uG2z0MnGKzartQGvJLZ7kNHI8OcNQ6Wj8qHE41sF0Mj7fTZWBY4h3d0UBS6jmiJlDabXSfTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783931365; c=relaxed/simple; bh=Ot7+C9UGMNl22EfCS4Age+LGddOUDBTSv2s3ZUnzIwk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=A9FnJ+PsWNvNckbg5TJG7c2S/+a4FToKXXjDkhgLzMtz55CewohdTO/1BO8WtPd9et7IvuoBY8POJJzaSRm49NHBgM+smKmKZKnjdbw0dn5Qr/2vr6V9THVqkbc806TOKYIzv8xu9oOSNVQMQ/js9KjuO/Qh4S4q+g7i49BLaKw= 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: f043f9627e9411f1aa26b74ffac11d73-20260713 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:68dbee0a-a14d-4316-aa3b-dbdd65e251d0,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:e7bac3a,CLOUDID:2107eb310cd2b0f4eca5df1b7a170f1a,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|850|865|898,TC:nil,Content:0|15|50,E DM:-3,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: f043f9627e9411f1aa26b74ffac11d73-20260713 X-User: lilinmao@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 1964969803; Mon, 13 Jul 2026 16:29:17 +0800 From: Linmao Li To: Boris Brezillon , Steven Price , Liviu Dudau Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , =?UTF-8?q?Adri=C3=A1n=20Larumbe?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Linmao Li Subject: [PATCH] drm/panthor: Check debugfs GEM lock initialization Date: Mon, 13 Jul 2026 16:29:12 +0800 Message-Id: <20260713082912.321021-1-lilinmao@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" drmm_mutex_init() can fail while registering the managed cleanup action. When that happens, drmm_add_action_or_reset() destroys the mutex before returning the error. Continuing initialization would therefore leave the debugfs GEM object list with an unusable lock. Propagate the error as is already done for the other managed mutexes in panthor_device_init(). Fixes: a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects= over DebugFS") Signed-off-by: Linmao Li Reviewed-by: Adri=C3=A1n Larumbe Reviewed-by: Liviu Dudau --- drivers/gpu/drm/panthor/panthor_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/pan= thor/panthor_device.c index 0b25abebb803..9687c59de350 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -182,7 +182,10 @@ int panthor_device_init(struct panthor_device *ptdev) return ret; =20 #ifdef CONFIG_DEBUG_FS - drmm_mutex_init(&ptdev->base, &ptdev->gems.lock); + ret =3D drmm_mutex_init(&ptdev->base, &ptdev->gems.lock); + if (ret) + return ret; + INIT_LIST_HEAD(&ptdev->gems.node); #endif =20 --=20 2.25.1