lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drm/omap: dmm_tiler: fix return error code in omap_dmm_probe()
From
Date
Hi

Am 17.11.20 um 07:10 schrieb Yang Yingliang:
> Return -ENOMEM when allocating refill memory failed.
>
> Fixes: 71e8831f6407 ("drm/omap: DMM/TILER support for OMAP4+ platform")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> index 42ec51bb7b1b..7f4317248812 100644
> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> @@ -889,6 +889,7 @@ static int omap_dmm_probe(struct platform_device *dev)
> &omap_dmm->refill_pa, GFP_KERNEL);
> if (!omap_dmm->refill_va) {
> dev_err(&dev->dev, "could not allocate refill memory\n");
> + ret = -ENOMEM;

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Thanks for the patch. I'll add it to drm-misc-next. There are more such
errors here. If the very first allocation fails, the function returns
-EFAULT, which makes no sense.

Best regards
Thomas

> goto fail;
> }
>
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

\
 
 \ /
  Last update: 2020-11-17 14:45    [W:0.040 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site