From patchwork Fri Jun 21 11:33:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 167384 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp619669ilk; Fri, 21 Jun 2019 04:34:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWXPy0tmC/v/fpzko8u0Q56Eh5weDlivQk78XkJ4BnALLWB/MWVgWfAZoVZqbRPGHTQ2z/ X-Received: by 2002:a17:902:8f87:: with SMTP id z7mr102983648plo.65.1561116843693; Fri, 21 Jun 2019 04:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561116843; cv=none; d=google.com; s=arc-20160816; b=RzWcdCETk9i9xNZPQE4MEPuMG4ETzGglqr+YNiVzCdEUkOA1xD2AAKPVvYEe9Sm2jh 217Tl+RD07HR65hILYSWds0XUYLkxkqzZzNK+1AyG2fk3j861S/HevX6otA1u6bT/SXN mK3nVNVv47KFpMzhfDRkPinZL024RQUu4V0zBAnPt5y5GaVgstkEKL1KdAb2VbLUcGgj rK+lS7isDE0uZYX8r1b8kmBN67wDxpf2cjng1wAmUlldPquslZdWqw/BhYTEqt1sIZMn OvVuDf0jN1Iq3YZSoTJbwjV1TUS0aPXtm0JXBpGrNBnC1PgLLfcNQpKSb8NkNiMK2th5 CFAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3FBFeMMQbHDljCo0ysZt4E1/LLDovdIwQ1oyGOMfxow=; b=YEhOPdq1kdRNdYgeaM7tXB3ZrV21Hap1xB3I44JDFL605ay1frLDXdx4TcjoeWUHDR NHz0Vba6Ykfe3ANjCPB7fihBjw+TljL5SyjBctrlnqFa2TVTJGowHTLzfUTgGA2Tbg2O WmDxm5KcpJWDLaBizFxW5VtZNs0ZUKzQMCXBcyPEjyJg22tdXeTO+NwrVkHPdf+Q3NDB ECkBeNpCDh3Ca87gyEBWSJ3KpeK3uD2xgbNPvABMlYkYJCRDuZKt2zZeJVuu3QJi4AAw +UC6nuJxuZtGo8+LsKkNWjBoUy/55wL/r/eh5EPiugyF7JfK0FQ+n0nyBhFw2goNGE/p p9Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=jr2yPJFj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si2351029pgh.425.2019.06.21.04.34.03; Fri, 21 Jun 2019 04:34:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=jr2yPJFj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726232AbfFULeC (ORCPT + 14 others); Fri, 21 Jun 2019 07:34:02 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:48414 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbfFULeC (ORCPT ); Fri, 21 Jun 2019 07:34:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3FBFeMMQbHDljCo0ysZt4E1/LLDovdIwQ1oyGOMfxow=; b=jr2yPJFjv8wsFKWBZQ1VqKv4b r6VdXmrj7q6VoPktD+/CgPd2w9HVxnPFyH+OF06FZhZd5chqZWLEMbj0z5JTVRYz2/my8YoYBuP2r tX6/gLSEEuiECdfOxv+JGyJJwUA7bMmSzRKEZ8W36anj5eZJH8dRl3EfO9QX2mbXY95xU=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=finisterre.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1heHnq-0002PW-H8; Fri, 21 Jun 2019 11:33:58 +0000 Received: by finisterre.sirena.org.uk (Postfix, from userid 1000) id 4305A440046; Fri, 21 Jun 2019 12:33:57 +0100 (BST) From: Mark Brown To: Liam Girdwood Cc: alsa-devel@alsa-project.org, Mark Brown , stable@vger.kernel.org Subject: [PATCH 1/2] ASoC: core: Adapt for debugfs API change Date: Fri, 21 Jun 2019 12:33:56 +0100 Message-Id: <20190621113357.8264-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Back in ff9fb72bc07705c (debugfs: return error values, not NULL) the debugfs APIs were changed to return error pointers rather than NULL pointers on error, breaking the error checking in ASoC. Update the code to use IS_ERR() and log the codes that are returned as part of the error messages. Fixes: ff9fb72bc07705c (debugfs: return error values, not NULL) Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- sound/soc/soc-core.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c510da2d4af6..6d5c09493f4b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -165,9 +165,10 @@ static void soc_init_component_debugfs(struct snd_soc_component *component) component->card->debugfs_card_root); } - if (!component->debugfs_root) { + if (IS_ERR(component->debugfs_root)) { dev_warn(component->dev, - "ASoC: Failed to create component debugfs directory\n"); + "ASoC: Failed to create component debugfs directory: %ld\n", + PTR_ERR(component->debugfs_root)); return; } @@ -219,18 +220,21 @@ static void soc_init_card_debugfs(struct snd_soc_card *card) card->debugfs_card_root = debugfs_create_dir(card->name, snd_soc_debugfs_root); - if (!card->debugfs_card_root) { + if (IS_ERR(card->debugfs_card_root)) { dev_warn(card->dev, - "ASoC: Failed to create card debugfs directory\n"); + "ASoC: Failed to create card debugfs directory: %ld\n", + PTR_ERR(card->debugfs_card_root)); + card->debugfs_card_root = NULL; return; } card->debugfs_pop_time = debugfs_create_u32("dapm_pop_time", 0644, card->debugfs_card_root, &card->pop_time); - if (!card->debugfs_pop_time) + if (IS_ERR(card->debugfs_pop_time)) dev_warn(card->dev, - "ASoC: Failed to create pop time debugfs file\n"); + "ASoC: Failed to create pop time debugfs file: %ld\n", + PTR_ERR(card->debugfs_pop_time)); } static void soc_cleanup_card_debugfs(struct snd_soc_card *card)