diff mbox

[v3,2/2] ASoC: soc-core: Use IS_ERR_OR_NULL()

Message ID 1502107733-29628-2-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Commit d9a02c552cd69c466998e3afdf420cb4c0b9d9d9
Headers show

Commit Message

Fabio Estevam Aug. 7, 2017, 12:08 p.m. UTC
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 mbox

Patch

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;