aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorJason Yan <[email protected]>2022-10-25 12:02:06 +0800
committerTheodore Ts'o <[email protected]>2022-11-06 01:07:59 -0400
commit9f2a1d9fb33a2129a9ba29bc61d3f14adb28ddc2 (patch)
treefa4ba763c6f9cd464feaad2381fd93c916b3919e /lib/memory-notifier-error-inject.c
parent1b8f787ef547230a3249bcf897221ef0cc78481b (diff)
ext4: fix wrong return err in ext4_load_and_init_journal()
The return value is wrong in ext4_load_and_init_journal(). The local variable 'err' need to be initialized before goto out. The original code in __ext4_fill_super() is fine because it has two return values 'ret' and 'err' and 'ret' is initialized as -EINVAL. After we factor out ext4_load_and_init_journal(), this code is broken. So fix it by directly returning -EINVAL in the error handler path. Cc: [email protected] Fixes: 9c1dd22d7422 ("ext4: factor out ext4_load_and_init_journal()") Signed-off-by: Jason Yan <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions