[PATCH] erofs: silence uninitialized variable warning in z_erofs_scan_folio()

Gao Xiang hsiangkao at linux.alibaba.com
Sat Jul 13 14:44:04 AEST 2024



On 2024/7/13 09:04, Dan Carpenter wrote:
> Smatch complains that:
> 
>      fs/erofs/zdata.c:1047 z_erofs_scan_folio()
>      error: uninitialized symbol 'err'.
> 
> The issue is if we hit this (!(map->m_flags & EROFS_MAP_MAPPED)) {
> condition then "err" isn't set.  It's inside a loop so we would have to
> hit that condition on every iteration.  Initialize "err" to zero to
> solve this.
> 
> Fixes: 5b9654efb604 ("erofs: teach z_erofs_scan_folios() to handle multi-page folios")
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>

Thanks, applied.

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list