zswap: ignore debugfs_create_dir() return value
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 15:21:08 +0000 (16:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2019 13:39:39 +0000 (15:39 +0200)
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Seth Jennings <sjenning@redhat.com>
Cc: linux-mm@kvack.org
Acked-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/zswap.c

index 2412042f55503f1736101b5b32b599b828b5cf76..0e22744a76cb6582389c76e37070752970114f00 100644 (file)
@@ -1253,8 +1253,6 @@ static int __init zswap_debugfs_init(void)
                return -ENODEV;
 
        zswap_debugfs_root = debugfs_create_dir("zswap", NULL);
-       if (!zswap_debugfs_root)
-               return -ENOMEM;
 
        debugfs_create_u64("pool_limit_hit", 0444,
                           zswap_debugfs_root, &zswap_pool_limit_hit);