On Fri, 15 Aug 2025, Dongsheng Yang wrote:
> The 'ret' varialbe may be returned without initialized in some branch,
> this patch make sure it is initialized correctly with 0.
Hi
I've already fixed it (and I folded the fix into the existing commit).
Mikulas
> Fixes: 6fb8fbbaf147 ("dm-pcache: add persistent cache target in
> device-mapper")
> Reported-by: kernel test robot <l...@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202508151712.qmqd87ii-...@intel.com/
> Signed-off-by: Dongsheng Yang <dongsheng.y...@linux.dev>
> ---
> drivers/md/dm-pcache/cache_dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-pcache/cache_dev.c
> b/drivers/md/dm-pcache/cache_dev.c
> index 722d7e952262..a7dafe8d35f7 100644
> --- a/drivers/md/dm-pcache/cache_dev.c
> +++ b/drivers/md/dm-pcache/cache_dev.c
> @@ -21,7 +21,7 @@ static int build_vmap(struct dax_device *dax_dev, long
> total_pages, void **vaddr
> struct page **pages;
> long i = 0, chunk;
> unsigned long pfn;
> - int ret;
> + int ret = 0;
>
> pages = vmalloc_array(total_pages, sizeof(struct page *));
> if (!pages)
> --
> 2.43.0
>