public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-media@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/7] media: coda: no need to check return value of debugfs_create functions
Date: Tue, 18 Aug 2020 15:36:03 +0200	[thread overview]
Message-ID: <20200818133608.462514-2-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20200818133608.462514-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: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/media/platform/coda/coda-common.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 3ab3d976d8ca..9020be29d8f2 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1937,9 +1937,6 @@ int coda_alloc_aux_buf(struct coda_dev *dev, struct coda_aux_buf *buf,
 		buf->blob.size = size;
 		buf->dentry = debugfs_create_blob(name, 0644, parent,
 						  &buf->blob);
-		if (!buf->dentry)
-			dev_warn(dev->dev,
-				 "failed to create debugfs entry %s\n", name);
 	}
 
 	return 0;
@@ -3211,8 +3208,6 @@ static int coda_probe(struct platform_device *pdev)
 	ida_init(&dev->ida);
 
 	dev->debugfs_root = debugfs_create_dir("coda", NULL);
-	if (!dev->debugfs_root)
-		dev_warn(&pdev->dev, "failed to create debugfs root\n");
 
 	/* allocate auxiliary per-device buffers for the BIT processor */
 	if (dev->devtype->product == CODA_DX6) {
-- 
2.28.0


  reply	other threads:[~2020-08-18 13:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 13:36 [PATCH 1/7] media: cec: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2020-08-18 13:36 ` Greg Kroah-Hartman [this message]
2020-08-18 13:56   ` [PATCH 2/7] media: coda: " Philipp Zabel
2020-08-18 13:36 ` [PATCH 3/7] media: exynos4-is: " Greg Kroah-Hartman
2020-08-18 13:36 ` [PATCH 4/7] media: mtk-vpu: " Greg Kroah-Hartman
2020-08-18 13:36 ` [PATCH 5/7] media: sti: " Greg Kroah-Hartman
2020-08-18 13:36 ` [PATCH 6/7] media: radio: si476x: " Greg Kroah-Hartman
2020-08-18 13:36 ` [PATCH 7/7] media: usb: uvc: " Greg Kroah-Hartman
2020-08-18 23:47   ` Laurent Pinchart
2020-09-17 12:25     ` Laurent Pinchart
2020-09-17 12:34       ` Greg Kroah-Hartman
2020-09-17 12:37         ` Laurent Pinchart
2020-09-17 12:46           ` 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=20200818133608.462514-2-gregkh@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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