summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-01-26 21:03:57 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-01-28 22:12:55 +0100
commit1081c1649da989ef9cbc01ffa99babc190df6077 (patch)
tree174bcc0709b53dd9e7b920821fe1077d16acbeae
parent2a7151942e8b1c92f3b71c0c5cb385df9a3df5e8 (diff)
PM: hibernate: Drop NULL pointer checks before acomp_request_free()
Since acomp_request_free() checks its argument against NULL, the NULL pointer checks before calling it added by commit ("7966cf0ebe32 PM: hibernate: Fix crash when freeing invalid crypto compressor") are redundant, so drop them. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/6233709.lOV4Wx5bFT@rafael.j.wysocki
-rw-r--r--kernel/power/swap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 8050e5182835..7e462957c9bf 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -902,8 +902,8 @@ out_clean:
for (thr = 0; thr < nr_threads; thr++) {
if (data[thr].thr)
kthread_stop(data[thr].thr);
- if (data[thr].cr)
- acomp_request_free(data[thr].cr);
+
+ acomp_request_free(data[thr].cr);
if (!IS_ERR_OR_NULL(data[thr].cc))
crypto_free_acomp(data[thr].cc);
@@ -1502,8 +1502,8 @@ out_clean:
for (thr = 0; thr < nr_threads; thr++) {
if (data[thr].thr)
kthread_stop(data[thr].thr);
- if (data[thr].cr)
- acomp_request_free(data[thr].cr);
+
+ acomp_request_free(data[thr].cr);
if (!IS_ERR_OR_NULL(data[thr].cc))
crypto_free_acomp(data[thr].cc);