From 45a7c1077ba759ee59d0549a66ed86e35815e18e Mon Sep 17 00:00:00 2001 From: Ronan Marchal Date: Mon, 15 Jun 2026 21:18:32 +0200 Subject: [PATCH] PM: hibernate: Use %pe to print error pointer values Use %pe format specifier instead of %ld with PTR_ERR() to print error pointers as a symbolic error name (e.g. -ENOMEM) instead of a raw integer value. Signed-off-by: Ronan Marchal [ rjw: Subject rewrite ] Link: https://patch.msgid.link/20260615191832.75923-1-ronanmarchal29@gmail.com Signed-off-by: Rafael J. Wysocki --- kernel/power/swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index c626e9dc3c1c..67570f74566c 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -739,7 +739,7 @@ static int save_compressed_image(struct swap_map_handle *handle, data[thr].cc = crypto_alloc_acomp(hib_comp_algo, 0, CRYPTO_ALG_ASYNC); if (IS_ERR_OR_NULL(data[thr].cc)) { - pr_err("Could not allocate comp stream %ld\n", PTR_ERR(data[thr].cc)); + pr_err("Could not allocate comp stream %pe\n", data[thr].cc); ret = -EFAULT; goto out_clean; } @@ -1243,7 +1243,7 @@ static int load_compressed_image(struct swap_map_handle *handle, data[thr].cc = crypto_alloc_acomp(hib_comp_algo, 0, CRYPTO_ALG_ASYNC); if (IS_ERR_OR_NULL(data[thr].cc)) { - pr_err("Could not allocate comp stream %ld\n", PTR_ERR(data[thr].cc)); + pr_err("Could not allocate comp stream %pe\n", data[thr].cc); ret = -EFAULT; goto out_clean; }