lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dde9d51db2c496fcddfb4161465851b6dff8e62e.camel@mediatek.com>
Date:   Wed, 26 Jul 2023 05:21:09 +0000
From:   CK Hu (胡俊光) <ck.hu@...iatek.com>
To:     "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC:     "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "fshao@...omium.org" <fshao@...omium.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "kernel@...labora.com" <kernel@...labora.com>
Subject: Re: [PATCH v2 1/6] drm/mediatek: mtk_dpi: Simplify with
 devm_drm_bridge_add()

Hi, Angelo:

On Wed, 2023-07-19 at 09:50 +0200, AngeloGioacchino Del Regno wrote:
> Change drm_bridge_add() to its devm variant to slightly simplify the
> probe function.

Reviewed-by: CK Hu <ck.hu@...iatek.com>

> 
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@...labora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
> b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 948a53f1f4b3..74068aa70e0c 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1090,11 +1090,12 @@ static int mtk_dpi_probe(struct
> platform_device *pdev)
>  	dpi->bridge.of_node = dev->of_node;
>  	dpi->bridge.type = DRM_MODE_CONNECTOR_DPI;
>  
> -	drm_bridge_add(&dpi->bridge);
> +	ret = devm_drm_bridge_add(dev, &dpi->bridge);
> +	if (ret)
> +		return ret;
>  
>  	ret = component_add(dev, &mtk_dpi_component_ops);
>  	if (ret) {
> -		drm_bridge_remove(&dpi->bridge);
>  		dev_err(dev, "Failed to add component: %d\n", ret);
>  		return ret;
>  	}
> @@ -1107,7 +1108,6 @@ static int mtk_dpi_remove(struct
> platform_device *pdev)
>  	struct mtk_dpi *dpi = platform_get_drvdata(pdev);
>  
>  	component_del(&pdev->dev, &mtk_dpi_component_ops);
> -	drm_bridge_remove(&dpi->bridge);
>  
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ