Commit 1081c164 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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 ("7966cf0e PM:
hibernate: Fix crash when freeing invalid crypto compressor") are
redundant, so drop them.

No intentional functional impact.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/6233709.lOV4Wx5bFT@rafael.j.wysocki
parent 2a715194
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -902,7 +902,7 @@ static int save_compressed_image(struct swap_map_handle *handle,
		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);

			if (!IS_ERR_OR_NULL(data[thr].cc))
@@ -1502,7 +1502,7 @@ static int load_compressed_image(struct swap_map_handle *handle,
		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);

			if (!IS_ERR_OR_NULL(data[thr].cc))