From nobody Thu Jun 18 09:19:28 2026 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6348421C16A for ; Thu, 30 Apr 2026 14:17:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777558673; cv=none; b=PlxzR3gJz1GGLGyxXU0zdCH+HpLXdG38FsQL6b+uIYmp1BUN6MB3gUCbLoSeBvihzvOhPqHc0Yg9blv6m7B3BBuIyI40QL0Ld33dKnKc80kNi9FSsnARNgu7zf+eIwCnRdnJts7BaRpajWJs9mV//9UJIFw79tw+SXUYl/IjeTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777558673; c=relaxed/simple; bh=gFZLXKT2dpa4hTwKqDya1NxmrLV4ZwBXxNrFAk2aWW8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f1Q363wdzdS+pFqgf4k9LcS/JeZqVg87Vlf1wUO3jDYT/o9UM6ehUQAo0V8VdsTvjHor1W5138kdlWpPz3O/h/f855XH2UV8J/aakKr3kWcYMBgvd6vfOcWFMlrCar0l7qSpWNWYi77MUrpqSo9Dt1QJt1cUdOXP6puUaFx/Aas= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UhV0ICpO; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UhV0ICpO" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-c6e2355739dso383160a12.2 for ; Thu, 30 Apr 2026 07:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777558672; x=1778163472; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UAauNnnUvbl64aUzC2unbwx0Ap9yYy1g7lYHiG+b7UA=; b=UhV0ICpOI7YL4okZnzAA7Bz1BOPS1v9jcOcOacHzZ9/4btgyVMBb6KLLTkQ2FgFnjj VWVNTuZvM+vCTwKLWfu9bRoUOcjDLi2f9NtbH225YGF9solLHgrwsabgsOL7OmSTTY6M 2QpyJu/sXfNeB7XMSZsh6R7sLrXu2Why5ta97CkFYuRVhqE4/L3ndVe8fMv2Vdo2gIrC QZyi1PLmnYm7VWSi4ClM3PpRj6CrXcYNOSllWrAGu4JnJDl8mvESAzcCkSe3iy7pQskA HSW4jJ5CiY6siN46hEARJvySSOyVe7OybLTRU9afytCKnJdQWg3SVtjeZyPJ3ocG64JR pe8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777558672; x=1778163472; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UAauNnnUvbl64aUzC2unbwx0Ap9yYy1g7lYHiG+b7UA=; b=svOp3zo/8LzRW9IVhiyNWirbdFPo910F1xP03rM/BVWPkrpCpMIoPp11kIxdZ01LVs /5bfStLI6K+WRvzYF7RuVQDTqe83qCYuG77rxYUYPvSMMvL53u3b2rlfPylz9s4hIyLp U4nujPGWItnDRtKZ8yhiNXLMEdTSbXNrk/WzVQeC7+WXqnKADOma2KJ+qRu7VZlWhQxA T6c9TPgNVtQqQQxq6VRFgrHkjE/pMQPlNKtkO3krCyoKqIvOlqjbQI4nYNKLUj6c3A0I 0P/AFtlGY3A/OjRDlHn8FtTZ08G3tIRe+ddJJ22BU+ImHTv2eHxlVS4yYCWNnj63Mk+q YgHw== X-Forwarded-Encrypted: i=1; AFNElJ+q0pUNpeCOyOQpBY4spyXJ/QzozuuphYzswZUV24yxr/T5NKO2ET6S8OmNE47WkGc0/2TtGHhif65u1l4=@vger.kernel.org X-Gm-Message-State: AOJu0YxVEfp8YrrRUWEUB/tUGYSR+93xPgqwyvBsNkSJuPVTmBz5S/6+ 4C+uVn/defgV8MuaaMSH/770VBV81k2gtv/qEbOqKGonIbbYD+2Irpg= X-Gm-Gg: AeBDiesR6mUd90I5fmGoKe0coOLaqvtf+Bisx6ab3/sKq6tDOTQ5sUQh2btgaXEKOZl j9miXw4gaWZ4nPiUF1FIuReNtMWBBg4yNzd/5a6oQmObnBbdFFYLO01PDgoSpjWNbJN4fwHpc6I 20GBDHYUuCvNUmPk0bAivBQPLMAhwIw+EWc+ug9p/Y1Eey2r1cC2uT2pmvamfdZfRk9qRTAg6PG K1ujYiH0EU81uSPN0yfZKLABZZ9kexF0MX1kkJtdQ+2dqzNnreo1kF0hGw7FIe0u2EgxZ5NMfB2 EuPKbMrDGdO69Uy7S9S8i7x71YoTAKKQ1//DLR+zkqQaF0hLYvVT4Fn4crNysusPlPHLA/PtwTS 0svfERmCNIrhe4j1w3q9UYbtORL5Xma62eamNtQvdw+57eiKTeZmjcfCQxTUX6brfNiO0QJhwtE UPG+Og1eI2rPfq+fyA96H4xLS96oT6OdpaQni7BhOgl0RmDHIVNaxaVz08FINO8OOjwKrVlIu/w +iU0FS9BxIROy/8zdoWM7/fMMRfby/krhDXfy96mnYSsGV1ZNBp X-Received: by 2002:a05:6a21:99a3:b0:3a0:129a:9748 with SMTP id adf61e73a8af0-3a3cf64411amr3702335637.25.1777558671481; Thu, 30 Apr 2026 07:17:51 -0700 (PDT) Received: from localhost.localdomain ([1.226.165.54]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c7fd6514ec6sm4824456a12.31.2026.04.30.07.17.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Apr 2026 07:17:50 -0700 (PDT) From: "=?UTF-8?q?=EB=B0=95=EB=AA=85=ED=9B=88?=" X-Google-Original-From: =?UTF-8?q?=EB=B0=95=EB=AA=85=ED=9B=88?= To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Myeonghun Pak , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ijae Kim Subject: [PATCH v2] drm/panel: tdo-tl070wsh30: Use devm_drm_panel_add() Date: Thu, 30 Apr 2026 23:17:38 +0900 Message-ID: <20260430141746.4214-1-pakmyeonghun@bagmyeonghun-ui-MacBookPro.local> X-Mailer: git-send-email 2.47.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" From: Myeonghun Pak tdo_tl070wsh30_panel_probe() registers the panel before attaching the DSI device. If mipi_dsi_attach() fails, the driver's remove callback is not called and the panel remains registered in the global DRM panel registry. Use devm_drm_panel_add() so panel registration is automatically unwound on probe failure and device removal, and drop the explicit drm_panel_remove() from the remove callback. Fixes: cf40c6600592 ("drm: panel: add TDO tl070wsh30 panel driver") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak --- Changes in v2: - Drop the now-unused tdo_tl070wsh30 variable from remove. drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c b/drivers/gpu/drm= /panel/panel-tdo-tl070wsh30.c index 227f97f9b..2b4ea6f0d 100644 --- a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c +++ b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c @@ -169,9 +169,7 @@ static int tdo_tl070wsh30_panel_add(struct tdo_tl070wsh= 30_panel *tdo_tl070wsh30) if (err) return err; =20 - drm_panel_add(&tdo_tl070wsh30->base); - - return 0; + return devm_drm_panel_add(dev, &tdo_tl070wsh30->base); } =20 static int tdo_tl070wsh30_panel_probe(struct mipi_dsi_device *dsi) @@ -200,14 +198,12 @@ static int tdo_tl070wsh30_panel_probe(struct mipi_dsi= _device *dsi) =20 static void tdo_tl070wsh30_panel_remove(struct mipi_dsi_device *dsi) { - struct tdo_tl070wsh30_panel *tdo_tl070wsh30 =3D mipi_dsi_get_drvdata(dsi); int err; =20 err =3D mipi_dsi_detach(dsi); if (err < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); =20 - drm_panel_remove(&tdo_tl070wsh30->base); } =20 static struct mipi_dsi_driver tdo_tl070wsh30_panel_driver =3D { --=20 2.49.0