From: Liviu Dudau <liviu.dudau@arm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm: ARM HDLCD - fix an error code
Date: Mon, 04 Apr 2016 09:17:05 +0000 [thread overview]
Message-ID: <20160404091705.GH27137@e106497-lin.cambridge.arm.com> (raw)
In-Reply-To: <20160402054224.GA19162@mwanda>
On Sat, Apr 02, 2016 at 08:42:24AM +0300, Dan Carpenter wrote:
> We accidentally return PTR_ERR(NULL) which is success instead of a
> negative error code.
>
> Fixes: 879e40bea6f2 ('drm: ARM HDLCD - get rid of devm_clk_put()')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> index 734849f..3ac1ae4 100644
> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> @@ -55,8 +55,9 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
> hdlcd->mmio = devm_ioremap_resource(drm->dev, res);
> if (IS_ERR(hdlcd->mmio)) {
> DRM_ERROR("failed to map control registers area\n");
> + ret = PTR_ERR(hdlcd->mmio);
> hdlcd->mmio = NULL;
> - return PTR_ERR(hdlcd->mmio);
> + return ret;
Good catch, thanks for that!
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
I've pulled your patch and sent an updated pull request.
Best regards,
Liviu
> }
>
> version = hdlcd_read(hdlcd, HDLCD_REG_VERSION);
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
==========
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
prev parent reply other threads:[~2016-04-04 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-02 5:42 [patch] drm: ARM HDLCD - fix an error code Dan Carpenter
2016-04-04 9:17 ` Liviu Dudau [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=20160404091705.GH27137@e106497-lin.cambridge.arm.com \
--to=liviu.dudau@arm.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@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