From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: airlied@gmail.com, liuhaoran <liuhaoran14@163.com>
Cc: daniel@ffwll.ch, samuel@sholland.org,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
liuhaoran <liuhaoran14@163.com>
Subject: Re: [PATCH] drm/sun4i: Add error handling in sun4i_layer_init_one()
Date: Sun, 24 Sep 2023 21:47:22 +0200 [thread overview]
Message-ID: <2156768.irdbgypaU6@jernej-laptop> (raw)
In-Reply-To: <20230924074216.17390-1-liuhaoran14@163.com>
Hi!
Dne nedelja, 24. september 2023 ob 09:42:16 CEST je liuhaoran napisal(a):
> This patch adds error-handling for the drm_plane_create_alpha_property()
> and drm_plane_create_zpos_property() inside the dw_hdmi_imx_probe().
dw_hdmi_imx_probe() is not from this driver.
Best regards,
Jernej
>
> Signed-off-by: liuhaoran <liuhaoran14@163.com>
> ---
> drivers/gpu/drm/sun4i/sun4i_layer.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
> index 98f3176366c0..a3343afb7935 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_layer.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
> @@ -224,9 +224,22 @@ static struct sun4i_layer *sun4i_layer_init_one(struct drm_device *drm,
> drm_plane_helper_add(&layer->plane,
> &sun4i_backend_layer_helper_funcs);
>
> - drm_plane_create_alpha_property(&layer->plane);
> - drm_plane_create_zpos_property(&layer->plane, layer->id,
> - 0, SUN4I_BACKEND_NUM_LAYERS - 1);
> + ret = drm_plane_create_alpha_property(&layer->plane);
> +
> + if (ret) {
> + dev_err(drm->dev, "Failed to install alpha property,
> + rc = %d\n", ret);
> + return ERR_PTR(ret);
> + }
> +
> + ret = drm_plane_create_zpos_property(&layer->plane, layer->id, 0,
> + SUN4I_BACKEND_NUM_LAYERS - 1);
> +
> + if (ret) {
> + dev_err(drm->dev, "Failed to install zpos property,
> + rc = %d\n", ret);
> + return ERR_PTR(ret);
> + }
>
> return layer;
> }
>
prev parent reply other threads:[~2023-09-24 19:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 7:42 [PATCH] drm/sun4i: Add error handling in sun4i_layer_init_one() liuhaoran
2023-09-24 9:09 ` kernel test robot
2023-09-24 19:47 ` Jernej Škrabec [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2156768.irdbgypaU6@jernej-laptop \
--to=jernej.skrabec@gmail.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=liuhaoran14@163.com \
--cc=samuel@sholland.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox