Skip to contentSkip to conversation

mm-zswap-fix-passing-zero-to-ptr_err-warning.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 16, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/zswap: fix passing zero to 'PTR_ERR' warning
has been removed from the -mm tree. Its filename was
mm-zswap-fix-passing-zero-to-ptr_err-warning.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: YueHaibing <[email protected]>
Subject: mm/zswap: fix passing zero to 'PTR_ERR' warning

Fix smatch warning:

mm/zswap.c:425 zswap_cpu_comp_prepare() warn: passing zero to 'PTR_ERR'

crypto_alloc_comp() never return NULL, use IS_ERR instead of IS_ERR_OR_NULL to fix this.

Fixes f1c54846ee45 ("zswap: dynamic pool creation")
Cc Seth Jennings <[email protected]>
Cc Dan Streetman <[email protected]>
Cc Vitaly Wool <[email protected]>

---

 mm/zswap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zswap.c renamed from mm/zswap.c~mm-zswap-fix-passing-zero-to-ptr_err-warning +1 -1
@@ -421,7 +421,7 @@ static int zswap_cpu_comp_prepare(unsign
 		return 0;
 
 	tfm = crypto_alloc_comp(pool->tfm_name, 0, 0);
-	if (IS_ERR_OR_NULL(tfm)) {
+	if (IS_ERR(tfm)) {
 		pr_err("could not alloc crypto comp %s : %ld\n",
 		       pool->tfm_name, PTR_ERR(tfm));
 		return -ENOMEM;

_

Patches currently in -mm which might be from [email protected] are