zram: remove unreachable kernel_read_file_from_path() return check

Sashiko reported that:
kernel_read_file_from_path() returns negative error for zero-sized
files, so we cannot have "sz == 0" return, remove it and use a
generic error message instead.

Link: https://lore.kernel.org/20260901051335.2202390-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Haoqin Huang <haoqinhuang7@gmail.com>
This commit is contained in:
Sergey Senozhatsky 2026-09-01 14:13:05 +09:00 committed by Andrew Morton
parent f2a50fd312
commit eb2c18a5f1

View File

@ -1722,11 +1722,6 @@ static int comp_params_store(struct zram *zram, u32 prio, s32 level,
dict_path, sz);
return sz;
}
if (sz == 0) {
pr_err("failed to load dictionary %s (empty file)\n",
dict_path);
return -EINVAL;
}
}
zram->params[prio].dict_sz = sz;