Re: [patch] drm: ARM HDLCD - fix an error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> 
> 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@xxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux