dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Liu Ying <Ying.Liu@freescale.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	airlied@linux.ie
Subject: Re: [PATCH v2] drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane
Date: Fri, 06 Nov 2015 16:24:59 +0100	[thread overview]
Message-ID: <1446823499.4569.5.camel@pengutronix.de> (raw)
In-Reply-To: <1446820965-19028-1-git-send-email-Ying.Liu@freescale.com>

Am Freitag, den 06.11.2015, 22:42 +0800 schrieb Liu Ying:
> For primary plane initialization failure cases, ipu_plane_init() may return
> a pointer encoded by ERR_PTR(). So, we should bailout instead of using that
> pointer blindly.
> 
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> ---
> v1->v2:
> * Trivial commit message fix.
> * Rebase onto Phillip's patch[1].
>   [1] http://www.spinics.net/lists/dri-devel/msg93700.html
> 
>  drivers/gpu/drm/imx/ipuv3-crtc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
> index 872183a..35a77e5 100644
> --- a/drivers/gpu/drm/imx/ipuv3-crtc.c
> +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
> @@ -361,6 +361,10 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc,
>  		dp = IPU_DP_FLOW_SYNC_BG;
>  	ipu_crtc->plane[0] = ipu_plane_init(drm, ipu, pdata->dma[0], dp, 0,
>  					    DRM_PLANE_TYPE_PRIMARY);
> +	if (IS_ERR(ipu_crtc->plane[0])) {
> +		ret = PTR_ERR(ipu_crtc->plane[0]);
> +		goto err_put_resources;
> +	}
>  
>  	ret = imx_drm_add_crtc(drm, &ipu_crtc->base, &ipu_crtc->imx_crtc,
>  			&ipu_crtc->plane[0]->base, &ipu_crtc_helper_funcs,

Applied, thanks.

regards
Philipp

      reply	other threads:[~2015-11-06 15:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 14:42 [PATCH v2] drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane Liu Ying
2015-11-06 15:24 ` Philipp Zabel [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=1446823499.4569.5.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=Ying.Liu@freescale.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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