From patchwork Wed May 29 06:53:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13677937 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (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 2AF4D16078E for ; Wed, 29 May 2024 06:54:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716965659; cv=none; b=dbS8J7QjM0yMPJkKQN+PA7Rxx99aCSd08Nmbi5QjHh79ZpUELr8/w4W4Ga7zUmoZHwaLZzYYyDDqXonl/dRJasdPMyqFJy83Cm93JoaFk4+Wu9hp0u9eHPs8w5c3nSAsml2/5N4/aAIlLmslbhS5iwXuvcfH9BqFYL49/ByMt5g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716965659; c=relaxed/simple; bh=tgDydAauTjHJcYqMVKFui/vNccmBSP8D3EDfoDldvGs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WOHkcKvaxunCz9fy3caUGjiCB8V8eonNSRETbtoxeCtlZ4JNm+Qi0O2L8v5woOJi4UTKvl7HAkqKgYcWMUAuKRpIF8QbY7SkjbENBi1T7tvCPhDDYRILesnuqi1WMU56Ldeum5JGIyYdg14we7PlCcoTvThSJluON1mHyX+7NOc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=H3asLmz3; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=Bdfeg6gH reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="H3asLmz3"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="Bdfeg6gH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1716965655; x=1748501655; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=QNRzo83mZGl9G2410HmioNDgIdVNX31t5SpCkoFYr+8=; b=H3asLmz3YGZaRi55ERBEPIbPVy5EA+g6s7hzy5bUkQfqDQ4hp8ZbetTf HxHzq4QJfhwD9nHrPS9nUG25kKXvCHu8WE2ciefzhlci+yvj7OpzxrCA5 gLi3aG/KU2l/VU4oZbkGBU58Myn7N/T/FXdoP4rs3srzJrfFhd1QdF9Ph LYbi24+Rs7LpmrtzyDFbJkT7hWkDmWQXRvumM++m0B9Lbp91ZCxXZAWvG Sa6FlIMSmS+kLO9D2l8xEJSweQWJ3+crrC7WSvutyCKH2SYCmw4Vh4mjy B8SSX4epra9Bfn0v3DIUOWlhEARTNmpTy2GE86MOYZc4SI1sckpQ74XoB g==; X-CSE-ConnectionGUID: SJwekOs4SRqwQrXOawD0mA== X-CSE-MsgGUID: DYZpWyxERPibBz6M9pvhCA== X-IronPort-AV: E=Sophos;i="6.08,197,1712613600"; d="scan'208";a="37117803" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 29 May 2024 08:54:12 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 78F8F165466; Wed, 29 May 2024 08:54:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1716965648; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=QNRzo83mZGl9G2410HmioNDgIdVNX31t5SpCkoFYr+8=; b=Bdfeg6gH84Vlbe+i8jRR2jAr7aux6uMweLpkeI7vw7sP3H2weCpr9L3pkQ/FQQFpXu67Z6 n9o2+XU0DjmRnsL6E9p7DoXxSmWDyn3kGa6UDEPKITRSPMzsm6Ay3AvRpJ0juX7uGRwerf toYPhm4AO86z2B0O51REBXe8G2/YfuNQL1l44tNk3fPT+P6v3eBG9Eb+x6g6icv0eSkCFb n1mcImCbeiR+Zue9qf2KX6iO0pXvrpjuwlcyLFE8dxhBCKhEsDb6w1/YBSsBvUNlz+rwIt MDjtTfp7Dm/CA6SesEOfykOEgvyiWeNfD7nX6yjtkO8Iv7NRLE0YEI/0pciNhA== From: Alexander Stein To: Liu Ying , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Alexander Stein , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] drm/bridge: imx93-mipi-dsi: Use dev_err_probe Date: Wed, 29 May 2024 08:53:58 +0200 Message-Id: <20240529065400.461633-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 Although very unlike to occur (media_blk_ctrl needs 'syscon' compatible removed), it lines up with the other error paths in probe function. Signed-off-by: Alexander Stein --- Changes in v2: * Removed unused variable * Added missing \n at end of string drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c b/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c index 2347f8dd632f9..13025f47f3902 100644 --- a/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c @@ -834,18 +834,15 @@ static int imx93_dsi_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct imx93_dsi *dsi; - int ret; dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); if (!dsi) return -ENOMEM; dsi->regmap = syscon_regmap_lookup_by_phandle(np, "fsl,media-blk-ctrl"); - if (IS_ERR(dsi->regmap)) { - ret = PTR_ERR(dsi->regmap); - dev_err(dev, "failed to get block ctrl regmap: %d\n", ret); - return ret; - } + if (IS_ERR(dsi->regmap)) + return dev_err_probe(dev, PTR_ERR(dsi->regmap), + "failed to get block ctrl regmap\n"); dsi->clk_pixel = devm_clk_get(dev, "pix"); if (IS_ERR(dsi->clk_pixel))