mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
f2a50fd312
commit
eb2c18a5f1
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user