diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 34f784a1604b7a60153567767f715fa3371eb675..907c9b1e1e6147d7c16441a3a0ee0ac9c9decd24 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1487,7 +1487,7 @@ void zs_free(struct zs_pool *pool, unsigned long handle)
 	struct size_class *class;
 	enum fullness_group fullness;
 
-	if (unlikely(!handle))
+	if (IS_ERR_OR_NULL((void *)handle))
 		return;
 
 	/*