From patchwork Mon Aug 7 03:16:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9884345 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 D274B602CC for ; Mon, 7 Aug 2017 03:17:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE50B28533 for ; Mon, 7 Aug 2017 03:17:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B25B528539; Mon, 7 Aug 2017 03:17:52 +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 079BC28533 for ; Mon, 7 Aug 2017 03:17:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9C883266FE1; Mon, 7 Aug 2017 05:17:10 +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 BA90C266FEA; Mon, 7 Aug 2017 05:17:09 +0200 (CEST) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by alsa0.perex.cz (Postfix) with ESMTP id 0DF72266F35 for ; Mon, 7 Aug 2017 05:17:06 +0200 (CEST) Received: by mail-qt0-f193.google.com with SMTP id c15so6674234qta.3 for ; Sun, 06 Aug 2017 20:17:05 -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=7DzgDwqgDFp5t6KkViG3npAcBJkXDa0diWC3NpnOdpw=; b=k/mmS/Bs+eHEz2Euoh+9aP3qDrS0zj9aaKkLUluKP12h6ZYSatoav5QvBSpnhARQ/u ImCKS3QRTxWXEPPRJh5sD9S8aXJ3Mp1gU9qjRhB79XvveeW97I2v5yd6LjSEpX1xVsct TQaehKD16b6aUK+rM2yAeI9Z8llkYMs60/oiq7OFn9KYh622u+p8RSaQ51qeYZ4UJaw6 g+AEf2wgxon4pcFTW9WjHrRTTM1vYEXI1u9ltaOlehb3dGETTGh1oiWntBJXrk1LMO2P 2dBmrMqis6lmQC8Tk/MQgdE0f5aIdTvEXQ/vQkkjANDuEsQcSVDwCVgl/5gOcqCb0iwz yvaw== 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=7DzgDwqgDFp5t6KkViG3npAcBJkXDa0diWC3NpnOdpw=; b=WsKxYjgYEdRpPVjneCjSbYxqWYHfjnpgwJAJHLAmEIdxi1Qu0yuWN5wRdCO9oBevC5 h7+NNeXihYSqq4Cv71sXDP3YjP+r6tgTeLfAJsZKxL/zwylX4T+cP1FOtdirA1GQEJUN 8sBdV3Ket+y9CTFaz3/R4T5r8e3R0za83VMLwzMHbWQc7/aQ5EPUkUJDy9slEPlulf9n 5PFw7fqZ8ZBqzgUGAI/R1r+iquRc74ebAd1tMkBSE3UaD5wuYyS06Wcj3jnn9RNHzc3c abStM91d0FKHEcj/htG9sOmtuB9wxW62LzrMfWahwEFAYrdPJmiSwGsZqEH24HoSvr9S a2xw== X-Gm-Message-State: AHYfb5i/KxgkH5mZ3n0JXfwznTAgxlOMZ8jO6sF3CAoMFaQ1AL1XUy7J oZCOyUkj8YLmqA== X-Received: by 10.200.45.240 with SMTP id q45mr14147216qta.332.1502075825346; Sun, 06 Aug 2017 20:17:05 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.203]) by smtp.gmail.com with ESMTPSA id v38sm5121213qtg.68.2017.08.06.20.17.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Aug 2017 20:17:04 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 7 Aug 2017 00:16:54 -0300 Message-Id: <1502075814-23766-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502075814-23766-1-git-send-email-festevam@gmail.com> References: <1502075814-23766-1-git-send-email-festevam@gmail.com> Cc: alsa-devel@alsa-project.org, Fabio Estevam Subject: [alsa-devel] [PATCH v2 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 --- Changes since v1: - Remove uneeded 'snd_soc_debugfs_root = NULL;' assignment sound/soc/soc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e93a72c..4edd00a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -495,9 +495,8 @@ 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; }