From patchwork Mon Aug 7 03:13:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9884331 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 E3973603F2 for ; Mon, 7 Aug 2017 03:13:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC10F28477 for ; Mon, 7 Aug 2017 03:13:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D13C82852E; Mon, 7 Aug 2017 03:13:34 +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 2A79C28477 for ; Mon, 7 Aug 2017 03:13:34 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 088A4266F4E; Mon, 7 Aug 2017 05:13:17 +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 4EF81266F7A; Mon, 7 Aug 2017 05:13:14 +0200 (CEST) Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by alsa0.perex.cz (Postfix) with ESMTP id 03AD8266F35 for ; Mon, 7 Aug 2017 05:13:10 +0200 (CEST) Received: by mail-qk0-f196.google.com with SMTP id x77so6554856qka.4 for ; Sun, 06 Aug 2017 20:13:10 -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=FGCSSwbbC0tfcIkoHMSa42zbugVwUTmQnxao2zAk68Q=; b=j7SRULV/hpsGO4Jill0DfF0aZjVupjQF50JHWSUDCWyixbYz4CESyU83GwMk9AEWq1 E+b8EvQDFQ3btOFrUYzVgLCI0h17W/LOtgu5bJ6M5rYEtIjcl8luic+z5Yyg9RoR6U2b 3ygzqa4P4+6FiAyTEvtdaOvdG2N2Se4NyGnBF1/7bXsVmmxA5+itPAcn6Luu3zYu2U4a /qPWmBa++jWuMSu574d7oNQ/XB9f4WInG67+2TR3nexXgNEPqsyjefaMkX3AQVSiVhnS OEfbCiMdCUjAOBXSJf57cCBIr/FMxVBqHl9CSWMgT/geZZU2ax/SK9ORk+JIBniwkwna cM9g== 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=FGCSSwbbC0tfcIkoHMSa42zbugVwUTmQnxao2zAk68Q=; b=bkeDhfSTrjGpMEhUk1PaWWjkHElrFOLAhnm9ri8wcjbIDg7khFUgkMDNr1pLvDqfF5 5V1SpmLm0f4P/TXaKb6cdpc2vn5NLTBtQlAIEC/eSWAyoj6YFJjZbWBy7Lna/+qNW19Y 2woofqSiurJNuz1nk8B+iivNFhWIYa9IA8PDbJEjptHukxMyEki9dxqhqej4CyE95FzM VCK4MNuQ2o+PpxjsZ9daZmsjcZEMXug3a8WUj5grq/BArt9I7jkVLRABiAcJNukWlNv2 0QRN455b66Cp0J7QvHN3hLFF357QvbngEwNkD1qo1qhfugcU9OVlMt9XEE2wCGR0bbty y79w== X-Gm-Message-State: AHYfb5iEVOpXFaESAhRZcGCHQNL/4nuWFnOu5eXr9lOYzDEYsPflm8Y/ 8vQTKVt5huFHRZP5 X-Received: by 10.55.200.24 with SMTP id c24mr11940592qkj.222.1502075588805; Sun, 06 Aug 2017 20:13:08 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.203]) by smtp.gmail.com with ESMTPSA id y10sm5333567qtb.57.2017.08.06.20.13.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Aug 2017 20:13:08 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 7 Aug 2017 00:13:06 -0300 Message-Id: <1502075586-23581-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502075586-23581-1-git-send-email-festevam@gmail.com> References: <1502075586-23581-1-git-send-email-festevam@gmail.com> Cc: alsa-devel@alsa-project.org, Fabio Estevam Subject: [alsa-devel] [PATCH 2/2] ASoC: soc-core: Remove unneeded error check 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 debugfs_create_dir() only returns an error pointer when kernel has been built without debugfs support. Quoting Documentation/filesystems/debugfs.txt: "A NULL return value indicates that something went wrong. If ERR_PTR(-ENODEV) is returned, that is an indication that the kernel has been built without debugfs support and none of the functions described below will work." As snd_soc_debugfs_init() is only defined when CONFIG_DEBUG_FS=y, there is no possibility for debugfs_create_dir() returning an error, so remove the unneeded error check. Signed-off-by: Fabio Estevam --- 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..f1d2a38 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 (!snd_soc_debugfs_root) { pr_warn("ASoC: Failed to create debugfs directory\n"); snd_soc_debugfs_root = NULL; return;