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) From patchwork Fri Jun 21 11:33:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 167383 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp619663ilk; Fri, 21 Jun 2019 04:34:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfd0HLK1J6d+0F05UDi6gBLgllNDfj+szrlVQaYV4z2vIIqR17zNQq73m34hf5fAFGg2eF X-Received: by 2002:a17:90a:a404:: with SMTP id y4mr6303821pjp.58.1561116843394; 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=bs8dXDZnn+fqKpmUe3Z4hu6SWjg+UZVpYMNo6PS7AYMf2InHoBSwEtd2DkGdN9tHa2 2eWT7bJLA8N/aazC41/wGJUPOVcCxdwcOxuE1lRt+ufUtbFvB+4jLktmPxFDPeuvnhjW 2gA24AaM9ssIaONwUesO4se1U+GeHoECRq4rbU/hvdQnBN0QdgEUw/yoU7delChUAaRa iwF5MUYuT0GwIM05gCKuXbZf5o5h00Gupxg0QQMwHh6i4q2DzJskGq+MVBdj5ZUcIXsW vV56f0/T5QALojLXTYZj7PEk8QQjCH20cJ/eMKQcK63M12jxRvhuWVLZl0uXGlrhoNEx 11aA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vAum9r+cTFtt1A+kfiwJThOZ57jM6FC+5+se9oFWUHA=; b=vtVP+GuQxtvb/W+51RrpyzJP/JwNk2+htvm8msvdPBOkH2OCid8PHoFNjfmBp40oyj Ks/+2DqNLAaVMFMsMGv40seWo5p8hJ7BHjeZGYFVNqcPoA/Ur7FQuVPO3qgsjAYCjoGe wy/0jwMhCONP9JFCtbRzfK+KNTLJWPI1VuyJK8CBVHBWzA7jVHB4g5f0N3f4jR8gUEDV hvJxWlhGPpgiCaiqVn4iQ3GxWevrGGceZDInMF9GApAuhLBwABt9NTmP0wGNncp5N0ZI btKFpkRcB+9ry9DDSpSPfcjAleZb37R/SwT3+tk+jBCObFEq2j3CYiTu/OjgjAdH871a VQIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=dkErER1z; 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=dkErER1z; 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 S1726309AbfFULeC (ORCPT + 14 others); Fri, 21 Jun 2019 07:34:02 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:48412 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbfFULeC (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:References:In-Reply-To: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:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vAum9r+cTFtt1A+kfiwJThOZ57jM6FC+5+se9oFWUHA=; b=dkErER1zL53TinPJkkfNLEDdDU lsUv6BSdLuZfDjrOC2lKumqE2G6/LIPE1rzoPOTsmq8TI+KSpKizYTt2TNE8skZA/JacvZ+fXubIR 6VH6YPPmw0XZx2y2pRBAv0suWAHJJqNBB18M7yff3XVNxZyBSEx6MyDf0bbSmsjlsWSw=; Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (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-0002PX-U9; Fri, 21 Jun 2019 11:33:58 +0000 Received: by finisterre.sirena.org.uk (Postfix, from userid 1000) id 495EF440041; 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 2/2] ASoC: dapm: Adapt for debugfs API change Date: Fri, 21 Jun 2019 12:33:57 +0100 Message-Id: <20190621113357.8264-2-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190621113357.8264-1-broonie@kernel.org> References: <20190621113357.8264-1-broonie@kernel.org> 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-dapm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6b44b4a78b8e..f013b24c050a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2156,23 +2156,25 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, { struct dentry *d; - if (!parent) + if (!parent || IS_ERR(parent)) return; dapm->debugfs_dapm = debugfs_create_dir("dapm", parent); - if (!dapm->debugfs_dapm) { + if (IS_ERR(dapm->debugfs_dapm)) { dev_warn(dapm->dev, - "ASoC: Failed to create DAPM debugfs directory\n"); + "ASoC: Failed to create DAPM debugfs directory %ld\n", + PTR_ERR(dapm->debugfs_dapm)); return; } d = debugfs_create_file("bias_level", 0444, dapm->debugfs_dapm, dapm, &dapm_bias_fops); - if (!d) + if (IS_ERR(d)) dev_warn(dapm->dev, - "ASoC: Failed to create bias level debugfs file\n"); + "ASoC: Failed to create bias level debugfs file: %ld\n", + PTR_ERR(d)); } static void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) @@ -2186,10 +2188,10 @@ static void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) d = debugfs_create_file(w->name, 0444, dapm->debugfs_dapm, w, &dapm_widget_power_fops); - if (!d) + if (IS_ERR(d)) dev_warn(w->dapm->dev, - "ASoC: Failed to create %s debugfs file\n", - w->name); + "ASoC: Failed to create %s debugfs file: %ld\n", + w->name, PTR_ERR(d)); } static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)