dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: dan.j.williams@intel.com, vkoul@kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sudeep Dutt <sudeep.dutt@intel.com>,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/6] dma: mic_x100_dma: no need to check return value of debugfs_create functions
Date: Wed, 12 Jun 2019 14:25:56 +0200	[thread overview]
Message-ID: <20190612122557.24158-5-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20190612122557.24158-1-gregkh@linuxfoundation.org>

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>
---
 drivers/dma/mic_x100_dma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index 6a91e28d537d..584e09661507 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -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;
 }
-- 
2.22.0


  parent reply	other threads:[~2019-06-12 12:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 12:25 [PATCH 1/6] dma: amba-pl08x: no need to cast away call to debugfs_create_file() Greg Kroah-Hartman
2019-06-12 12:25 ` [PATCH 2/6] dma: bcm-sba-raid: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-06-12 12:25 ` [PATCH 3/6] dma: coh901318: no need to cast away call to debugfs_create_file() Greg Kroah-Hartman
2019-06-12 12:42   ` Linus Walleij
2019-06-12 12:25 ` [PATCH 4/6] dma: pxa_dma: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-08-10 19:27   ` Robert Jarzmik
2019-08-11  7:03     ` Greg Kroah-Hartman
2019-08-13 21:21       ` Robert Jarzmik
2019-06-12 12:25 ` Greg Kroah-Hartman [this message]
2019-06-12 15:44   ` [PATCH 5/6] dma: mic_x100_dma: " Sudeep Dutt
2019-06-12 12:25 ` [PATCH 6/6] dma: qcom: hidma: " Greg Kroah-Hartman
2019-06-12 15:24   ` Sinan Kaya
2019-06-12 15:39     ` Greg Kroah-Hartman
2019-06-12 16:17       ` Sinan Kaya
2019-06-12 16:47         ` Greg Kroah-Hartman
2019-06-14  5:46 ` [PATCH 1/6] dma: amba-pl08x: no need to cast away call to debugfs_create_file() Vinod Koul
2019-06-14  5:55   ` Greg Kroah-Hartman
2019-06-18 16:00   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190612122557.24158-5-gregkh@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=ashutosh.dixit@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.dutt@intel.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).