Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+4 -4
+4 -4
kernel/power/swap.c
··· 902 902 for (thr = 0; thr < nr_threads; thr++) { 903 903 if (data[thr].thr) 904 904 kthread_stop(data[thr].thr); 905 - if (data[thr].cr) 906 - acomp_request_free(data[thr].cr); 905 + 906 + acomp_request_free(data[thr].cr); 907 907 908 908 if (!IS_ERR_OR_NULL(data[thr].cc)) 909 909 crypto_free_acomp(data[thr].cc); ··· 1502 1502 for (thr = 0; thr < nr_threads; thr++) { 1503 1503 if (data[thr].thr) 1504 1504 kthread_stop(data[thr].thr); 1505 - if (data[thr].cr) 1506 - acomp_request_free(data[thr].cr); 1505 + 1506 + acomp_request_free(data[thr].cr); 1507 1507 1508 1508 if (!IS_ERR_OR_NULL(data[thr].cc)) 1509 1509 crypto_free_acomp(data[thr].cc);