]> git.itanic.dy.fi Git - linux-stable/commit
dmaengine: dw-edma: Stop checking debugfs_create_*() return value
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Fri, 13 Jan 2023 17:13:53 +0000 (20:13 +0300)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Fri, 27 Jan 2023 16:15:33 +0000 (17:15 +0100)
commit37d058aae75b965a1c597979a194c9dba79ac913
tree5ab6f20055b87748f5456c3a0c4b9e104776267d
parent7ca9f025a731b3391f9321a324d8eb7a5b008c5a
dmaengine: dw-edma: Stop checking debugfs_create_*() return value

The debugfs_create_*() functions never return NULL, so checking their
return value for NULL is pointless. Secondly, the debugfs subsystem is
designed to be as simple as possible, so if one of the debugfs_create_*()
method in a hierarchy fails, the following methods should silently return
the passed erroneous parental dentry. Finally, the code should work no
matter whether anything debugfs-related fails.

To make code simpler and debugfs-independent, stop checking the
debugfs_create_*() return values.

If the debugfs file system is unavailable, skip the debugfs node
initialization altogether to preserve some memory space.

Link: https://lore.kernel.org/r/20230113171409.30470-12-Sergey.Semin@baikalelectronics.ru
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw-edma/dw-edma-v0-debugfs.c