]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dma-pool: no need to check return value of debugfs_create functions
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 7 Nov 2020 10:03:12 +0000 (18:03 +0800)
committerChristoph Hellwig <hch@lst.de>
Fri, 27 Nov 2020 09:33:42 +0000 (10:33 +0100)
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.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/pool.c

index d4637f72239b404f4fbef822e74cb4c441062034..5f84e6cdb78ea4e8897318a898f2f3f291611155 100644 (file)
@@ -38,9 +38,6 @@ static void __init dma_atomic_pool_debugfs_init(void)
        struct dentry *root;
 
        root = debugfs_create_dir("dma_pools", NULL);
-       if (IS_ERR_OR_NULL(root))
-               return;
-
        debugfs_create_ulong("pool_size_dma", 0400, root, &pool_size_dma);
        debugfs_create_ulong("pool_size_dma32", 0400, root, &pool_size_dma32);
        debugfs_create_ulong("pool_size_kernel", 0400, root, &pool_size_kernel);