alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, Fabio Estevam <festevam@gmail.com>
Subject: [PATCH v3 2/2] ASoC: soc-core: Use IS_ERR_OR_NULL()
Date: Mon,  7 Aug 2017 09:08:53 -0300	[thread overview]
Message-ID: <1502107733-29628-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1502107733-29628-1-git-send-email-festevam@gmail.com>

The check of IS_ERR or NULL pointer can be replaced by IS_ERR_OR_NULL(),
which helps readability.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v2:
- Keep the error checking and use IS_ERR_OR_NULL() instead.

 sound/soc/soc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e93a72c..0026eff 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -495,7 +495,7 @@ static void soc_cleanup_card_debugfs(struct snd_soc_card *card)
 static void snd_soc_debugfs_init(void)
 {
 	snd_soc_debugfs_root = debugfs_create_dir("asoc", NULL);
-	if (IS_ERR(snd_soc_debugfs_root) || !snd_soc_debugfs_root) {
+	if (IS_ERR_OR_NULL(snd_soc_debugfs_root)) {
 		pr_warn("ASoC: Failed to create debugfs directory\n");
 		snd_soc_debugfs_root = NULL;
 		return;
-- 
2.7.4

  reply	other threads:[~2017-08-07 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 12:08 [PATCH v3 1/2] ASoC: soc-core: Remove unneeded dentry member from snd_soc_codec Fabio Estevam
2017-08-07 12:08 ` Fabio Estevam [this message]
2017-08-07 15:53   ` Applied "ASoC: soc-core: Use IS_ERR_OR_NULL()" to the asoc tree Mark Brown

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=1502107733-29628-2-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@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).