All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: unlisted-recipients:; (no To-header on input)@bombadil.infradead.org
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH 6/6] siano: get rid of an unused return code for debugfs register
Date: Wed,  8 Aug 2018 10:52:56 -0400	[thread overview]
Message-ID: <76af93fcc30cb20d9560d897bd0999c5434ee9f5.1533739965.git.mchehab+samsung@kernel.org> (raw)
In-Reply-To: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org>
In-Reply-To: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org>

The siano's debugfs register logic is optional: it should be ok
if it fails. So, no need to check if debufs register succeeded.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/common/siano/smsdvb-debugfs.c | 10 +++++-----
 drivers/media/common/siano/smsdvb.h         |  7 ++-----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c
index 40891f4f842b..c95d4583498e 100644
--- a/drivers/media/common/siano/smsdvb-debugfs.c
+++ b/drivers/media/common/siano/smsdvb-debugfs.c
@@ -500,7 +500,7 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client)
 	client->debugfs = NULL;
 }
 
-int smsdvb_debugfs_register(void)
+void smsdvb_debugfs_register(void)
 {
 	struct dentry *d;
 
@@ -517,15 +517,15 @@ int smsdvb_debugfs_register(void)
 	d = debugfs_create_dir("smsdvb", usb_debug_root);
 	if (IS_ERR_OR_NULL(d)) {
 		pr_err("Couldn't create sysfs node for smsdvb\n");
-		return PTR_ERR(d);
-	} else {
-		smsdvb_debugfs_usb_root = d;
+		return;
 	}
-	return 0;
+	smsdvb_debugfs_usb_root = d;
 }
 
 void smsdvb_debugfs_unregister(void)
 {
+	if (!smsdvb_debugfs_usb_root)
+		return;
 	debugfs_remove_recursive(smsdvb_debugfs_usb_root);
 	smsdvb_debugfs_usb_root = NULL;
 }
diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h
index b15754d95ec0..befeb9817e54 100644
--- a/drivers/media/common/siano/smsdvb.h
+++ b/drivers/media/common/siano/smsdvb.h
@@ -107,7 +107,7 @@ struct RECEPTION_STATISTICS_PER_SLICES_S {
 
 int smsdvb_debugfs_create(struct smsdvb_client_t *client);
 void smsdvb_debugfs_release(struct smsdvb_client_t *client);
-int smsdvb_debugfs_register(void);
+void smsdvb_debugfs_register(void);
 void smsdvb_debugfs_unregister(void);
 
 #else
@@ -119,10 +119,7 @@ static inline int smsdvb_debugfs_create(struct smsdvb_client_t *client)
 
 static inline void smsdvb_debugfs_release(struct smsdvb_client_t *client) {}
 
-static inline int smsdvb_debugfs_register(void)
-{
-	return 0;
-};
+static inline void smsdvb_debugfs_register(void) {}
 
 static inline void smsdvb_debugfs_unregister(void) {};
 
-- 
2.17.1

      parent reply	other threads:[~2018-08-08 17:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 14:52 [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted Mauro Carvalho Chehab
2018-08-08 14:52 ` Mauro Carvalho Chehab
2018-08-08 14:52 ` Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 2/6] media: saa7164: fix return codes for the polling routine Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 3/6] media: s3c-camif: fix return code " Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 4/6] media: radio-wl1273: " Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer Mauro Carvalho Chehab
2018-08-08 15:45   ` Laurent Pinchart
2018-09-07 11:46     ` Laurent Pinchart
2018-09-11 15:30       ` Laurent Pinchart
2018-09-20 14:44       ` Mauro Carvalho Chehab
2018-09-20 17:20         ` Laurent Pinchart
2018-08-08 14:52 ` Mauro Carvalho Chehab [this message]

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=76af93fcc30cb20d9560d897bd0999c5434ee9f5.1533739965.git.mchehab+samsung@kernel.org \
    --to=mchehab+samsung@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.