[Intel-gfx] [PATCH] dma-buf: Add debug option

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 15 15:59:08 UTC 2021


Quoting Daniel Vetter (2021-01-15 15:52:26)
> +static void mangle_sg_table(struct sg_table *sg_table)
> +{
> +#ifdef CONFIG_DMABUF_DEBUG
> +       int i;
> +       struct scatterlist *sg;
> +
> +       if (!sg_table)

if (!IS_ENABLED(CONFIG_DMABUF_DEBUG) || IS_ERR_OR_NULL(sg_table))
> +               return;

Although NULL is not meant to be returned.
-Chris


More information about the Intel-gfx mailing list