From: Archit Taneja <architt@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
Fabian Frederick <fabf@skynet.be>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Thierry Reding <treding@nvidia.com>
Subject: Re: [patch] drm/omap: checking for NULL instead of IS_ERR()
Date: Fri, 31 Jul 2015 09:58:53 +0000 [thread overview]
Message-ID: <55BB440D.8060603@codeaurora.org> (raw)
In-Reply-To: <20150731093330.GA11127@mwanda>
Hi,
On 07/31/2015 03:03 PM, Dan Carpenter wrote:
> We recently start using the new drm_fb_helper functions but the error
> handling needs to be updated as well to check for IS_ERR() instead of
> NULL.
>
> Fixes: 377eb331375f ('drm/omap: Use new drm_fb_helper functions')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index 08ef090..b8e4cde 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -180,9 +180,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
> mutex_lock(&dev->struct_mutex);
>
> fbi = drm_fb_helper_alloc_fbi(helper);
> - if (!fbi) {
> + if (IS_ERR(fbi)) {
> dev_err(dev->dev, "failed to allocate fb info\n");
> - ret = -ENOMEM;
> + ret = PTR_ERR(fbi);
> goto fail_unlock;
> }
I was going to post out a v3 for this set. I'll squash this and mention
the fix in the changelog.
Thanks,
Archit
>
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
WARNING: multiple messages have this Message-ID (diff)
From: Archit Taneja <architt@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
Fabian Frederick <fabf@skynet.be>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Thierry Reding <treding@nvidia.com>
Subject: Re: [patch] drm/omap: checking for NULL instead of IS_ERR()
Date: Fri, 31 Jul 2015 15:16:53 +0530 [thread overview]
Message-ID: <55BB440D.8060603@codeaurora.org> (raw)
In-Reply-To: <20150731093330.GA11127@mwanda>
Hi,
On 07/31/2015 03:03 PM, Dan Carpenter wrote:
> We recently start using the new drm_fb_helper functions but the error
> handling needs to be updated as well to check for IS_ERR() instead of
> NULL.
>
> Fixes: 377eb331375f ('drm/omap: Use new drm_fb_helper functions')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index 08ef090..b8e4cde 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -180,9 +180,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
> mutex_lock(&dev->struct_mutex);
>
> fbi = drm_fb_helper_alloc_fbi(helper);
> - if (!fbi) {
> + if (IS_ERR(fbi)) {
> dev_err(dev->dev, "failed to allocate fb info\n");
> - ret = -ENOMEM;
> + ret = PTR_ERR(fbi);
> goto fail_unlock;
> }
I was going to post out a v3 for this set. I'll squash this and mention
the fix in the changelog.
Thanks,
Archit
>
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-07-31 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 9:33 [patch] drm/omap: checking for NULL instead of IS_ERR() Dan Carpenter
2015-07-31 9:33 ` Dan Carpenter
2015-07-31 9:46 ` Archit Taneja [this message]
2015-07-31 9:58 ` Archit Taneja
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=55BB440D.8060603@codeaurora.org \
--to=architt@codeaurora.org \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabf@skynet.be \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=tomi.valkeinen@ti.com \
--cc=treding@nvidia.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.