pstore/ram: Consolidate kfree() paths
authorKees Cook <keescook@chromium.org>
Tue, 11 Oct 2022 20:01:08 +0000 (13:01 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 17 Oct 2022 20:14:32 +0000 (13:14 -0700)
commit3219122b8cdd580f0793e803d4e80ecd7384cf17
tree503d05c2ae868d8e04d3e7aa88bf4dc7d6877b42
parent893c5f1de620fb0134ddef37dfd850f6c639162b
pstore/ram: Consolidate kfree() paths

There's no reason to keep separate kfree() paths: either all allocations
succeeded, or not. Everything is torn down in the case of failure, so
adjust the callers to reflect this.

Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-and-tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20221011200112.731334-2-keescook@chromium.org
fs/pstore/ram.c