[1/2] drm/tegra: Return an error code if fails

suijingfeng suijingfeng at loongson.cn
Thu Jul 27 10:02:54 UTC 2023


Hi,

Gentle ping for this series.


On 2023/6/26 22:33, Sui Jingfeng wrote:
> Return -ENOMEM if tegra_bo_mmap() fails.
>
> Signed-off-by: Sui Jingfeng <suijingfeng at loongson.cn>
> ---
>   drivers/gpu/drm/tegra/gem.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
> index dea38892d6e6..0ce22935fbd3 100644
> --- a/drivers/gpu/drm/tegra/gem.c
> +++ b/drivers/gpu/drm/tegra/gem.c
> @@ -710,6 +710,8 @@ static int tegra_gem_prime_vmap(struct dma_buf *buf, struct iosys_map *map)
>   	void *vaddr;
>   
>   	vaddr = tegra_bo_mmap(&bo->base);
> +	if (!vaddr)
> +		return -ENOMEM;
>   	if (IS_ERR(vaddr))
>   		return PTR_ERR(vaddr);
>   



More information about the dri-devel mailing list