From patchwork Mon Aug 7 12:08:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9885199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 536A9603B4 for ; Mon, 7 Aug 2017 12:09:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44B74284E3 for ; Mon, 7 Aug 2017 12:09:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39D5E285AF; Mon, 7 Aug 2017 12:09:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84A30284E3 for ; Mon, 7 Aug 2017 12:09:27 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B2A062671E3; Mon, 7 Aug 2017 14:09:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6F3B32671EA; Mon, 7 Aug 2017 14:09:11 +0200 (CEST) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by alsa0.perex.cz (Postfix) with ESMTP id 704322671E0 for ; Mon, 7 Aug 2017 14:09:03 +0200 (CEST) Received: by mail-qk0-f195.google.com with SMTP id d145so220241qkc.0 for ; Mon, 07 Aug 2017 05:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TM2268agZkqUHN0y8qbG9MNLyEeMnI9+r8UZVV1l/lw=; b=iGRIObB5nXg6xpF1ip3tCQv+BAh8+ogr2ZEi8M46MRuZ3sNvBAdGrZBaQH1JSk2xyU jsxkxnhuJQ3p7bgpK5Cip1vv1+ndebzjQW1CwTcZHfuqUruwHB1cCkEi4ecJv56x0RNp gg/TYKiUKcdNsezLJfhE9XnskD7K8WZBZQOtYL6rx5cC1aS5EtsxsVxmmwMFO+9a6lMf U9Y5ipU6G32iaIu/prra2wLQ+Gl0Xb/vXhiW7MyvManfZxH0VOEziMBvJpo3q0YZHcOE TfvbSBGtzRcgXxlGgTCHvbWSfcWnLV+j4iICZubuHAQnmraagipoHAk2LU0CFI0PBVnn LLpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TM2268agZkqUHN0y8qbG9MNLyEeMnI9+r8UZVV1l/lw=; b=arxy1w5xes47RBuSmv8k3hXptHxxzwKwefuPirltf6Ng3QvNM2dP8vU5yzooxjL7w4 9ihaFPyVSsRAT8q6jnSYVdLppu0ghPGXopZhQwgbIFyZYZ6mdNyswIpKS1jrZXURd7N6 2lddWON/55Tbxiq4GVldDIReWalZbZsrN4qtn2TOUxhE3B/zK8sXNoQ0NN6HRC8tjaQ+ UHkYhXczH39HUbagmi3rF7C2GYG8kJgw2WswM/03AIs7ndJ4pPee/30Tw3t4nH8AqhIl suv3/BlZwJRbuEsZs11pp7KU3RpB4eyXXv0QHTW5G/SRvD8Ge1+aSzUdgBbPOKPMjZGO ZLOA== X-Gm-Message-State: AHYfb5hTQQCpgqoKqA5CgC3/I1S3UtKks2ZP04QimocA3Lr3QKk67beR jpu9Jpc697D0nA== X-Received: by 10.55.165.137 with SMTP id o131mr386098qke.226.1502107742982; Mon, 07 Aug 2017 05:09:02 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.203]) by smtp.gmail.com with ESMTPSA id w63sm1935769qkb.67.2017.08.07.05.09.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Aug 2017 05:09:02 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 7 Aug 2017 09:08:53 -0300 Message-Id: <1502107733-29628-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502107733-29628-1-git-send-email-festevam@gmail.com> References: <1502107733-29628-1-git-send-email-festevam@gmail.com> Cc: alsa-devel@alsa-project.org, Fabio Estevam Subject: [alsa-devel] [PATCH v3 2/2] ASoC: soc-core: Use IS_ERR_OR_NULL() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The check of IS_ERR or NULL pointer can be replaced by IS_ERR_OR_NULL(), which helps readability. Signed-off-by: Fabio Estevam --- 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;