From patchwork Fri Jul 3 19:38:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 2526 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 438901C3FFB for ; Fri, 3 Jul 2026 21:44:05 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=qualcomm.com; dkim=pass header.d=oss.qualcomm.com; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-24127-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-24127-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 6E2A73010F63 for ; Fri, 3 Jul 2026 19:43:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EB7F331A61; Fri, 3 Jul 2026 19:43:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="nOeTG4ty"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gq4hSPgd" X-Original-To: linux-sunxi@lists.linux.dev Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 669E533439A for ; Fri, 3 Jul 2026 19:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783107810; cv=none; b=DAcd/RiexATVdl+gLESH2wMYoKr3h4A6eRWt4H28ekWA5rrAjO0HSV8wIQ2Y6XLCnskWD2bq3F5fIHtr/+tVpBIy1lh4IcDQ1yLld99wVFvivcSTDOaswDBRCPL/7qUgmVJKTAf0Vp0jlFd8keEe4JULH0wvLivtVCvh5nX0wBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783107810; c=relaxed/simple; bh=so6MW8lL0On5dP1UN+ooRHBEwT1W2FhfHQtdPS4G+WQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tEmCGa2RFk0Ueyymu/N0GiHgilQ9U65WC1WnL3hmw2UK9jiucR9j2NzfFKXffx0RZVJ8ev4iwJx3tK9ipXpTQQC2sBweo1+k63F4ll/SY1UrsDTVylN/1ABwTBz3j1t70HqQ1gLg8FPuW3THQLAIeTMOPnegAkWLpomT4+0qhLU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=nOeTG4ty; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gq4hSPgd; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 663Hibev545676 for ; Fri, 3 Jul 2026 19:43:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=bn4n8Ensq4b 2jWU5voHmUQF7/CVhT1UW+T0M+N3rGrg=; b=nOeTG4ty30vKw+ttbYanSVJ6ILE BTAP2O4+nJPij6iXWRyXJ6gBds/5MB5tBMGqFWh+/u8gKduK/0McbMFjobNCnuzN 1y+6/ZZnKyZ62+pPM/DEC4Iylg8Krq0wAPqD6KdtuGk+Zdk4DKUeyMhiXbzJYdVL bIj/QJM7hN5BtusgbHD8m9xNThogT6wHKhQIkdOp/hbQypKE27fZgHchGeO+1BTT VPUpeh/bBZI59ScXYRgw65wzTgoMMnoJmFsZzRgRsYFyWaGGYCwKpfq4lPUztwV7 wVHDf06/SCOxR42J2Z9vbHr4UhAdTAjtbJeXNkQiLE7+wIkknP7olxo/NEw== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f682btr1g-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 03 Jul 2026 19:43:27 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-c8894570b58so644168a12.3 for ; Fri, 03 Jul 2026 12:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783107807; x=1783712607; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bn4n8Ensq4b2jWU5voHmUQF7/CVhT1UW+T0M+N3rGrg=; b=gq4hSPgd+SXQ+FNRPdrKKP9Iw1Zv4yZ1bU6y5vdQtT9oYqJEeS5FuU2NfY9AqJFV44 sveoUJ3rs6Txq7hkkt9WlrENhGb3aFlTveSEdGnY8iFTmn46p7oC7iyhI3Qz0OQPAqKd qMx7tnir1aZLKLxmPlCGHCR0E2CL0UcWfF+EzK3ExsaZMpDG/nuP5UetCBeJ04+WxtH9 axcVVasvMWJExSAn8kDvWR5xQHCJWuT6Sg4N1GWNltkIkccs+O/LGYGhCq1JYAwHJ7xm T3J0nMlAKZsVTHQreSbXTpnMUbViFuUtdVYXBfrN6JYlUIySq8D0R0okakgz7ryHHKWa 0MzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783107807; x=1783712607; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=bn4n8Ensq4b2jWU5voHmUQF7/CVhT1UW+T0M+N3rGrg=; b=qFrIiu24ZScuP/6rR3TTWFGvvzWYgzCzHeYnUY3WCQTxW0sJ6ZvUkQ/ekV3oHF9f2J 6/GxMIbOFsVOH20Tf5Vmh8AJpp20xoZ/dN9vH97ws1dwmZ7loLzE/N/iNwuX817JFwV0 bUMN5HKfX7aQVVy4ecaTf/MEsNlKDjzbtjjAJBP6QWgW6jWSeR2W5Vt3eCgFnBFABW5S luw6jiSCVKlkb8YagNe5Fxj3GummEQi0HePUWpukfFzk9v7WO+trLF1ey8P3R9eM0IqT cBfXb/lFBSQGt6YzopATj4cJui6itLfmaPFYsNuH3K9+gnatymSamJG0bcq0RwObsg9C IOkw== X-Forwarded-Encrypted: i=1; AHgh+RocCHqxA6KmlYRLq04l6gyiW0WH2nilDoZ2Ky47kPZct4gi1NtItX2GmaV1zBE/6Yd3tQcLl35tQUf65w==@lists.linux.dev X-Gm-Message-State: AOJu0Yxz1EsFcTRo3ET62pdyYocaEab2bGxZfG22ib3NnaqjmANLCvm9 tTUSeWgWI2ReYl4HmTrKASFdf32QrwP+oNazsgtVjoS/++is8z561QWQR0Wct6R1nmV5vlsbN37 Stux0Lw8vIX3vds1e0DijutU41Ks983UHONEnJM2IDtVvL8egIN0/p/+UOpYoIwfGJw== X-Gm-Gg: AfdE7cnrjS2Cb+1wUil0d6+Ar5qsHvb8srTBz/JCpyPOFmFtq1xuwAsJXEk+iWtqaL/ QRpQYmBz2ZJe6raNI+xE1EwdJa5NubD/4WqFeLDU1Z+RfNVqN+Xox7KtzOzgqx2gjF+iOs3GJLU lQkt6fg5DJRjqlUXIkwXXY6VixbxodfEy/y5yXsdOXxuQA8PN5qd/VT7dGD/xc7lLxXI1r+feqA B+RV3KInDoIvqxQd+LHvn1dRp/cvzlL/QPnYzOSo3llt6EFRXE7azGs1xwy5k/fwp6rJOc2JBaX 6RmIZUZr0NVVHczOVkGFj8jxkxG/YpEU2WlYA2jii0tetl9Xu3P0cPOu/QAqbshfU5VW7EmAeZ/ smCKogq38k4IvU4d+7BQi5uSSJ8+79YKS8rCAug== X-Received: by 2002:a17:90b:48c6:b0:37e:2005:6507 with SMTP id 98e67ed59e1d1-38280e98cfamr773014a91.15.1783107806460; Fri, 03 Jul 2026 12:43:26 -0700 (PDT) X-Received: by 2002:a17:90b:48c6:b0:37e:2005:6507 with SMTP id 98e67ed59e1d1-38280e98cfamr772970a91.15.1783107805852; Fri, 03 Jul 2026 12:43:25 -0700 (PDT) Received: from hu-mojha-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30f290b6bc2sm10065845eec.27.2026.07.03.12.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2026 12:43:25 -0700 (PDT) From: Mukesh Ojha To: Bjorn Andersson , Konrad Dybcio , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Joel Stanley , Andrew Jeffery , Paul Cercueil , Anitha Chrisanthus , Paul Kocialkowski , Linus Walleij , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Alexey Brodkin , Laurent Pinchart , Tomi Valkeinen , Michal Simek , Daniel Scally , Jacopo Mondi , Mauro Carvalho Chehab , Eddie James , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Matthias Brugger , AngeloGioacchino Del Regno , Joseph Liu , Marvin Lin , Dmitry Osipenko , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Srinivas Kandagatla , Arnd Bergmann , Greg Kroah-Hartman , Ge Gordon , Adrian Hunter , Ulf Hansson , Rob Herring , Saravana Kannan , Mathieu Poirier , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Frank Li , Sascha Hauer , Peter Ujfalusi , Bard Liao , Daniel Baluta , Orson Zhai , Baolin Wang , Peter Chen , Fugang Duan Cc: Ekansh Gupta , BST Linux Kernel Upstream Group , Fabio Estevam , Nicolin Chen , Pengutronix Kernel Team , Kai Vehmanen , Pierre-Louis Bossart , Vijendar Mukunda , Chunyan Zhang , CIX Linux Kernel Upstream Group , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-media@vger.kernel.org, openbmc@lists.ozlabs.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, linux-tegra@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-staging@lists.linux.dev, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, sound-open-firmware@alsa-project.org, Mukesh Ojha Subject: [PATCH 10/42] drm: pl111: Use devm_of_reserved_mem_device_init() Date: Sat, 4 Jul 2026 01:08:23 +0530 Message-ID: <20260703193855.110619-11-mukesh.ojha@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260703193855.110619-1-mukesh.ojha@oss.qualcomm.com> References: <20260703193855.110619-1-mukesh.ojha@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAzMDE5OSBTYWx0ZWRfX/vbWa2E2LVRQ bs8AFY/ICEFuRpuUhwCi8M5xiFWnabE1G83QxKcMdnMVWwL2KebuEi8/ykjIDEuLbezH1aAgH7M GAAUf/WYaaY682vpBeA81FmejVXyVFWfKRF2MpyzI4a0hIHxZUDhx85AJDxuLop4oOphkfQJ1Ki awRTRPTKQKSkVBvZEHuFibXkqZW1kRki/X06rpEo6dIlSqZUsA32ewiwzXnmm8GrPN3fNdh3h3u zjGL5G57FrEfNU3kE14KI1cODrxGEH8sREZWkg9i5FrfYZVKezcvuB6DdNKh+qiWitiiaO+z2fl UtIDZsYQPEvWmAoHrnh6gNbz41oH6s90o8E+9v8VxyC/7X47IRqilchHJUJNKQJlHvmXBIU/11s vSMn3fH+EqU75IhBHbIK3DBvpYqx3pp/Q4t2c9Oxp9nSk3JQv5Ld0DWlTqpK9EOR1v0NeTmB3xN o4JzOaFz/Inub+oVjdA== X-Proofpoint-ORIG-GUID: 45qNtVdph7m83m-N6lBxYxkJUzv5eAD2 X-Authority-Analysis: v=2.4 cv=cc3iaHDM c=1 sm=1 tr=0 ts=6a4810df cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=ih0ztwYHz3j8HjU85xEA:9 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAzMDE5OSBTYWx0ZWRfX5PwXPuHAsabF sGjUO4H+BjcT/8dVOAKLWFEy9rqFxbmMvbqe0jvfI1gHOq920LQ2KlT18Kotix9tXasgJY1++De AqjrSC0rq3BOoG0T4vHcTDoUAMRUseQ= X-Proofpoint-GUID: 45qNtVdph7m83m-N6lBxYxkJUzv5eAD2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-03_03,2026-07-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 adultscore=0 bulkscore=0 priorityscore=1501 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607030199 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Switch to devm_of_reserved_mem_device_init() so the reserved memory region is released automatically on probe failure or device removal. Remove the explicit of_reserved_mem_device_release() calls in the dev_put error path and pl111_amba_remove(). Signed-off-by: Mukesh Ojha Reviewed-by: Linus Walleij --- drivers/gpu/drm/pl111/pl111_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index ac7b1d12a0f5..25ce37a4e8bf 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -254,7 +254,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev, drm->dev_private = priv; priv->variant = variant; - ret = of_reserved_mem_device_init(dev); + ret = devm_of_reserved_mem_device_init(dev); if (!ret) { drm_info(drm, "using device-specific reserved memory\n"); priv->use_device_memory = true; @@ -313,7 +313,6 @@ static int pl111_amba_probe(struct amba_device *amba_dev, dev_put: drm_dev_put(drm); - of_reserved_mem_device_release(dev); return ret; } @@ -329,7 +328,6 @@ static void pl111_amba_remove(struct amba_device *amba_dev) if (priv->panel) drm_panel_bridge_remove(priv->bridge); drm_dev_put(drm); - of_reserved_mem_device_release(dev); } static void pl111_amba_shutdown(struct amba_device *amba_dev)