From patchwork Sun Feb 18 17:50:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 202825 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp885554dyc; Sun, 18 Feb 2024 09:51:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWhSAVUCFNak+Qqz65zXxrvShNtAss3itYDdYUYSMSlcat6SNgh1IgFcJD/y/e5egaBVlgj1XLFSQ5ekWZoyGrCkA/c8w== X-Google-Smtp-Source: AGHT+IHHHDgRgIOlv656M+QIBy+qCZDbb0tDD/qEiIq1lw14O6HLGakKVqJs4Rq7DKyL76hupaoS X-Received: by 2002:ac2:4893:0:b0:512:9e78:998c with SMTP id x19-20020ac24893000000b005129e78998cmr2856947lfc.9.1708278661528; Sun, 18 Feb 2024 09:51:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708278661; cv=pass; d=google.com; s=arc-20160816; b=C05ZDkO4HU/4wv3Mph/tr+gRNY54k3qqqs0Fn4exaYG4dMCbtHICAorTL+aPVadeKL /tYjDHfrU1Y2H94600Je3FtMw7h1ZOZjxOXKe5ipccgGOMt4/Bsxip3MXkXEXECcp7dN qhT6HyG2fI4LpNo8e17qr1xURiA5kJCasi6REBzqENODniiB8IizEt7aGdWWLvfiEk4J Ig8ZrlEKg1fq+hZxlim5v3YEmq3SAHlhdlFMXf3559QwhsWGDBrn2JutsxXdNclds+ZR kiVPSpneekXflHpOCEoKKdYxt0aT6rh9gwtUfJwe10lM0WN/Z4zReHnX264r5MH3dA5I E6BQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yjpbxfuUN8ClVWyejRT9z307tEN2okR2Dj3IppGtU+I=; fh=hWIDXfSt3tpC78HDOSHiFDRV5p4SYSIMWQoocNDlnOE=; b=CFHenoiNKc1X9POogj2aFwGzqVBw4r2ScBCuYYhsC1OXONeYOHiYdVKMeF+IaTEA5C dW4KUkdHq5oHkmDuquOkGDXv2uD0p6xhXoshB0XY1e9MBIqQZPNPJ3enLRDIEegfM13G aGHII3MsmSjIA49fKXEaRKVeTFy1s2HlxhYV7/JdV3z7QSCUMhMDqxcgADCgtmU4UZ02 C/ZcD8PMhUa8Ktg7sqJb1kJ0mpbsgRoxv2MZrt1SHixj5p88zszZm8Xa197GRvkD3l2g wk6Bfq/w0RXn77/GpmF3Dj3rIp5ULchMrKMz5XYEf7Vn1ZGxQDhoS0K8wjMNG/lyiC16 P30g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20230601 header.b=Tqsovb1m; arc=pass (i=1 spf=pass spfdomain=googlemail.com dkim=pass dkdomain=googlemail.com dmarc=pass fromdomain=googlemail.com); spf=pass (google.com: domain of linux-kernel+bounces-70468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70468-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lx14-20020a170906af0e00b00a3e6c171119si601346ejb.228.2024.02.18.09.51.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 09:51:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20230601 header.b=Tqsovb1m; arc=pass (i=1 spf=pass spfdomain=googlemail.com dkim=pass dkdomain=googlemail.com dmarc=pass fromdomain=googlemail.com); spf=pass (google.com: domain of linux-kernel+bounces-70468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70468-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F1CF61F21988 for ; Sun, 18 Feb 2024 17:51:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EF816F084; Sun, 18 Feb 2024 17:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="Tqsovb1m" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 C81D06BB58 for ; Sun, 18 Feb 2024 17:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278643; cv=none; b=bnoeeE8Coa/Lvdo7shVZnLOmhe2iGTB5HVJHX+xgPibTlpXIEpn9SHwNwVt5UOzzikALEvl35zUll1by1uZ5yQpYT3x5zU6cyuvJTSACLjbgfJCvGn1AOqcGL4/MMS2WPDAZ+jC7a4JBwQaf8aOrEY5aYuygnL7Q8oxQ4ctsVP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278643; c=relaxed/simple; bh=xDfZP8wJP+CnkLvneZNZk+TexK8AnkyFmF4ymPXAd9Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RiGC6/jAFRvllOSqDY7sqZuI8Y0AP0wOn0N76umtAWYMG4ewlfJYkQwOvHlzDWiQUF0lr3fH2rSkVp/u2aD+2Hwc7G4l5CzMw33VYnVDqnGMDtgp0igYmG7y/Ft+vO22OFlqUYui137FHP8RciptPVsV6paL6CaPvNJ+S16WcoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b=Tqsovb1m; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d22b8801b9so18019381fa.0 for ; Sun, 18 Feb 2024 09:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1708278640; x=1708883440; 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=yjpbxfuUN8ClVWyejRT9z307tEN2okR2Dj3IppGtU+I=; b=Tqsovb1mXuWjnORTx0WRYQ1RQnV/+NibsQXeBR07E7dihD21VLt5kCq53V5s0jj5lk Lar7upL7oDX6IL3PVpZXplrLibWmczDrR0a7WmXkOk5b6nGAgIe+S8jT2lBbpYTuo3o0 Av2R3LL4WQMAuREsgRP0c3bTBxm7z2JvFi+gxuW37XHzHXV3eEZLOxLYB5rVsH3ExWHT pOO1uqXsTd1VA2YfwdjOa8QPdtgBktHW1tx81JFZYvw+awS+JmNoh7EY8dmv3peFIuyK wD203TQKiBRXU3QlmOTDEIw9NroG6ZGVm4ieWIqKyRXScW63G3LQyBJb3DVdBpnbyJCL gKLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708278640; x=1708883440; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yjpbxfuUN8ClVWyejRT9z307tEN2okR2Dj3IppGtU+I=; b=S/qXJ4g0ICnr0KmkDpvi4QG1RPq+jVUXXLM3BFTKcQLGlrhzhA++d3Uy/cc6uXnyvx YRaCk2W7ujIRJM8GoOdEQsSMRNFjFDMeQWAbF2rVgTVjwKdzDwHp1DJHND3kak9LvIYo S0XSdVnkXMYlXbQJmOZNsvPH2kDCkNM9frG1lwLq10Y1D3mMzIxafWSJPwPzwZ43Ni6e ALDAZTqYv5Y2exKw6ENrm0b2bxHa80kp/TCAA/wZObqZefU4MVdbgUmfU1bUcS8EQut7 ejtyf3SFA+W/2gqxMS38XVKj9SdJ52tNU5Auo1SWss6vnOMwSbu08O8fPdnzEnGUmndU aJ5Q== X-Forwarded-Encrypted: i=1; AJvYcCW3mLJmA9AuO8/kDCfrtxXXxymvHg1MwqJVmY3MG4Kwy3SYW9WivkRT8v8rUow0nLUBXfH18HZyZi1QDwiv2LHle3Ngrb/lg3vFMSXv X-Gm-Message-State: AOJu0YycreTAQjY62jY6QjQ0Pr/+51VMKKf1xsgMW6zmAJ535JxzhPoK 9wVs6FmaUmx2TUhV0EOzWxA9JmLP+E8/ldAbUhcE2pEt9yUgaB34 X-Received: by 2002:a2e:854e:0:b0:2d0:9a93:1fe0 with SMTP id u14-20020a2e854e000000b002d09a931fe0mr6234553ljj.11.1708278639558; Sun, 18 Feb 2024 09:50:39 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c22-7b37-4900-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:7b37:4900::e63]) by smtp.googlemail.com with ESMTPSA id ck8-20020a0564021c0800b0056452477a5esm829283edb.24.2024.02.18.09.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 09:50:39 -0800 (PST) From: Martin Blumenstingl To: dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org Cc: neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl Subject: [PATCH v1] drm/meson: improve encoder probe / initialization error handling Date: Sun, 18 Feb 2024 18:50:35 +0100 Message-ID: <20240218175035.1948165-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791260005683194617 X-GMAIL-MSGID: 1791260005683194617 Rename meson_encoder_{cvbs,dsi,hdmi}_init() to meson_encoder_{cvbs,dsi,hdmi}_probe() so it's clear that these functions are used at probe time during driver initialization. Also switch all error prints inside those functions to use dev_err_probe() for consistency. This makes the code more straight forward to read and makes the error prints within those functions consistent (by logging all -EPROBE_DEFER with dev_dbg(), while actual errors are logged with dev_err() and get the error value printed). Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong --- This is meant to be applied on top of my other patch called "drm/meson: Don't remove bridges which are created by other drivers" [0] [0] https://lore.kernel.org/dri-devel/20240215220442.1343152-1-martin.blumenstingl@googlemail.com/ drivers/gpu/drm/meson/meson_drv.c | 6 +++--- drivers/gpu/drm/meson/meson_encoder_cvbs.c | 24 ++++++++++------------ drivers/gpu/drm/meson/meson_encoder_cvbs.h | 2 +- drivers/gpu/drm/meson/meson_encoder_dsi.c | 23 +++++++++------------ drivers/gpu/drm/meson/meson_encoder_dsi.h | 2 +- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 15 +++++++------- drivers/gpu/drm/meson/meson_encoder_hdmi.h | 2 +- 7 files changed, 35 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index cb674966e9ac..17a5cca007e2 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -312,7 +312,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) /* Encoder Initialization */ - ret = meson_encoder_cvbs_init(priv); + ret = meson_encoder_cvbs_probe(priv); if (ret) goto exit_afbcd; @@ -326,12 +326,12 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) } } - ret = meson_encoder_hdmi_init(priv); + ret = meson_encoder_hdmi_probe(priv); if (ret) goto exit_afbcd; if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) { - ret = meson_encoder_dsi_init(priv); + ret = meson_encoder_dsi_probe(priv); if (ret) goto exit_afbcd; } diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c b/drivers/gpu/drm/meson/meson_encoder_cvbs.c index 3407450435e2..d1191de855d9 100644 --- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c +++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c @@ -219,7 +219,7 @@ static const struct drm_bridge_funcs meson_encoder_cvbs_bridge_funcs = { .atomic_reset = drm_atomic_helper_bridge_reset, }; -int meson_encoder_cvbs_init(struct meson_drm *priv) +int meson_encoder_cvbs_probe(struct meson_drm *priv) { struct drm_device *drm = priv->drm; struct meson_encoder_cvbs *meson_encoder_cvbs; @@ -240,10 +240,9 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote); of_node_put(remote); - if (!meson_encoder_cvbs->next_bridge) { - dev_err(priv->dev, "Failed to find CVBS Connector bridge\n"); - return -EPROBE_DEFER; - } + if (!meson_encoder_cvbs->next_bridge) + return dev_err_probe(priv->dev, -EPROBE_DEFER, + "Failed to find CVBS Connector bridge\n"); /* CVBS Encoder Bridge */ meson_encoder_cvbs->bridge.funcs = &meson_encoder_cvbs_bridge_funcs; @@ -259,10 +258,9 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) /* Encoder */ ret = drm_simple_encoder_init(priv->drm, &meson_encoder_cvbs->encoder, DRM_MODE_ENCODER_TVDAC); - if (ret) { - dev_err(priv->dev, "Failed to init CVBS encoder: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(priv->dev, ret, + "Failed to init CVBS encoder\n"); meson_encoder_cvbs->encoder.possible_crtcs = BIT(0); @@ -276,10 +274,10 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) /* Initialize & attach Bridge Connector */ connector = drm_bridge_connector_init(priv->drm, &meson_encoder_cvbs->encoder); - if (IS_ERR(connector)) { - dev_err(priv->dev, "Unable to create CVBS bridge connector\n"); - return PTR_ERR(connector); - } + if (IS_ERR(connector)) + return dev_err_probe(priv->dev, PTR_ERR(connector), + "Unable to create CVBS bridge connector\n"); + drm_connector_attach_encoder(connector, &meson_encoder_cvbs->encoder); priv->encoders[MESON_ENC_CVBS] = meson_encoder_cvbs; diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.h b/drivers/gpu/drm/meson/meson_encoder_cvbs.h index 09710fec3c66..7b7bc85c03f7 100644 --- a/drivers/gpu/drm/meson/meson_encoder_cvbs.h +++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.h @@ -24,7 +24,7 @@ struct meson_cvbs_mode { /* Modes supported by the CVBS output */ extern struct meson_cvbs_mode meson_cvbs_modes[MESON_CVBS_MODES_COUNT]; -int meson_encoder_cvbs_init(struct meson_drm *priv); +int meson_encoder_cvbs_probe(struct meson_drm *priv); void meson_encoder_cvbs_remove(struct meson_drm *priv); #endif /* __MESON_VENC_CVBS_H */ diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.c b/drivers/gpu/drm/meson/meson_encoder_dsi.c index 311b91630fbe..7816902f5907 100644 --- a/drivers/gpu/drm/meson/meson_encoder_dsi.c +++ b/drivers/gpu/drm/meson/meson_encoder_dsi.c @@ -100,7 +100,7 @@ static const struct drm_bridge_funcs meson_encoder_dsi_bridge_funcs = { .atomic_reset = drm_atomic_helper_bridge_reset, }; -int meson_encoder_dsi_init(struct meson_drm *priv) +int meson_encoder_dsi_probe(struct meson_drm *priv) { struct meson_encoder_dsi *meson_encoder_dsi; struct device_node *remote; @@ -118,10 +118,9 @@ int meson_encoder_dsi_init(struct meson_drm *priv) } meson_encoder_dsi->next_bridge = of_drm_find_bridge(remote); - if (!meson_encoder_dsi->next_bridge) { - dev_dbg(priv->dev, "Failed to find DSI transceiver bridge\n"); - return -EPROBE_DEFER; - } + if (!meson_encoder_dsi->next_bridge) + return dev_err_probe(priv->dev, -EPROBE_DEFER, + "Failed to find DSI transceiver bridge\n"); /* DSI Encoder Bridge */ meson_encoder_dsi->bridge.funcs = &meson_encoder_dsi_bridge_funcs; @@ -135,19 +134,17 @@ int meson_encoder_dsi_init(struct meson_drm *priv) /* Encoder */ ret = drm_simple_encoder_init(priv->drm, &meson_encoder_dsi->encoder, DRM_MODE_ENCODER_DSI); - if (ret) { - dev_err(priv->dev, "Failed to init DSI encoder: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(priv->dev, ret, + "Failed to init DSI encoder\n"); meson_encoder_dsi->encoder.possible_crtcs = BIT(0); /* Attach DSI Encoder Bridge to Encoder */ ret = drm_bridge_attach(&meson_encoder_dsi->encoder, &meson_encoder_dsi->bridge, NULL, 0); - if (ret) { - dev_err(priv->dev, "Failed to attach bridge: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(priv->dev, ret, + "Failed to attach bridge\n"); /* * We should have now in place: diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.h b/drivers/gpu/drm/meson/meson_encoder_dsi.h index 9277d7015193..85d5b61805f2 100644 --- a/drivers/gpu/drm/meson/meson_encoder_dsi.h +++ b/drivers/gpu/drm/meson/meson_encoder_dsi.h @@ -7,7 +7,7 @@ #ifndef __MESON_ENCODER_DSI_H #define __MESON_ENCODER_DSI_H -int meson_encoder_dsi_init(struct meson_drm *priv); +int meson_encoder_dsi_probe(struct meson_drm *priv); void meson_encoder_dsi_remove(struct meson_drm *priv); #endif /* __MESON_ENCODER_DSI_H */ diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c index c4686568c9ca..22e07847a9a7 100644 --- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c +++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c @@ -354,7 +354,7 @@ static const struct drm_bridge_funcs meson_encoder_hdmi_bridge_funcs = { .atomic_reset = drm_atomic_helper_bridge_reset, }; -int meson_encoder_hdmi_init(struct meson_drm *priv) +int meson_encoder_hdmi_probe(struct meson_drm *priv) { struct meson_encoder_hdmi *meson_encoder_hdmi; struct platform_device *pdev; @@ -374,8 +374,8 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) meson_encoder_hdmi->next_bridge = of_drm_find_bridge(remote); if (!meson_encoder_hdmi->next_bridge) { - dev_err(priv->dev, "Failed to find HDMI transceiver bridge\n"); - ret = -EPROBE_DEFER; + ret = dev_err_probe(priv->dev, -EPROBE_DEFER, + "Failed to find HDMI transceiver bridge\n"); goto err_put_node; } @@ -393,7 +393,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) ret = drm_simple_encoder_init(priv->drm, &meson_encoder_hdmi->encoder, DRM_MODE_ENCODER_TMDS); if (ret) { - dev_err(priv->dev, "Failed to init HDMI encoder: %d\n", ret); + dev_err_probe(priv->dev, ret, "Failed to init HDMI encoder\n"); goto err_put_node; } @@ -403,7 +403,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) ret = drm_bridge_attach(&meson_encoder_hdmi->encoder, &meson_encoder_hdmi->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR); if (ret) { - dev_err(priv->dev, "Failed to attach bridge: %d\n", ret); + dev_err_probe(priv->dev, ret, "Failed to attach bridge\n"); goto err_put_node; } @@ -411,8 +411,9 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) meson_encoder_hdmi->connector = drm_bridge_connector_init(priv->drm, &meson_encoder_hdmi->encoder); if (IS_ERR(meson_encoder_hdmi->connector)) { - dev_err(priv->dev, "Unable to create HDMI bridge connector\n"); - ret = PTR_ERR(meson_encoder_hdmi->connector); + ret = dev_err_probe(priv->dev, + PTR_ERR(meson_encoder_hdmi->connector), + "Unable to create HDMI bridge connector\n"); goto err_put_node; } drm_connector_attach_encoder(meson_encoder_hdmi->connector, diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.h b/drivers/gpu/drm/meson/meson_encoder_hdmi.h index a6cd38eb5f71..fd5485875db8 100644 --- a/drivers/gpu/drm/meson/meson_encoder_hdmi.h +++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.h @@ -7,7 +7,7 @@ #ifndef __MESON_ENCODER_HDMI_H #define __MESON_ENCODER_HDMI_H -int meson_encoder_hdmi_init(struct meson_drm *priv); +int meson_encoder_hdmi_probe(struct meson_drm *priv); void meson_encoder_hdmi_remove(struct meson_drm *priv); #endif /* __MESON_ENCODER_HDMI_H */