Re: [PATCH next] drm/i915: Fix NULL vs IS_ERR() check in __shmem_writeback()
From: Andi Shyti
Date: Thu Feb 06 2025 - 06:17:35 EST
> The filemap_lock_folio() function doesn't return NULL, it returns error
> pointers.
>
> Fixes: 25dd342f0cc8 ("drm/i915/gem: convert __shmem_writeback() to folios")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
...
> struct folio *folio;
>
> folio = filemap_lock_folio(mapping, i);
> - if (!folio)
> + if (IS_ERR(folio))
ops! Thanks, Dan
Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>
Andi