dmaengine: mic_x100_dma: no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jun 2019 12:25:56 +0000 (14:25 +0200)
committerVinod Koul <vkoul@kernel.org>
Fri, 14 Jun 2019 05:44:58 +0000 (11:14 +0530)
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: Sudeep Dutt <sudeep.dutt@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/mic_x100_dma.c

index 6a91e28d537de7f82e79c74a663f3019c96160c5..584e096615072cbac6046e3e8024958d0c609358 100644 (file)
@@ -728,10 +728,8 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
        if (mic_dma_dbg) {
                mic_dma_dev->dbg_dir = debugfs_create_dir(dev_name(&mbdev->dev),
                                                          mic_dma_dbg);
-               if (mic_dma_dev->dbg_dir)
-                       debugfs_create_file("mic_dma_reg", 0444,
-                                           mic_dma_dev->dbg_dir, mic_dma_dev,
-                                           &mic_dma_reg_fops);
+               debugfs_create_file("mic_dma_reg", 0444, mic_dma_dev->dbg_dir,
+                                   mic_dma_dev, &mic_dma_reg_fops);
        }
        return 0;
 }