From patchwork Wed Jul 24 19:21:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169670 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp11168094ilk; Wed, 24 Jul 2019 22:43:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqziE5zxvpZtOWPhQI/2fhTEMhKHswmFpXMvsS4fwrQfXLHNnaJLwxN2AyhxTc/+vMxjHvez X-Received: by 2002:a65:4808:: with SMTP id h8mr83790887pgs.22.1564033432884; Wed, 24 Jul 2019 22:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033432; cv=none; d=google.com; s=arc-20160816; b=GQ08AgOVci12/81xzLW4kNRqa1AR4JQxwchRd0LCNhh7ZRYlO4zprFQ2Lh7NbVKb1k mVF9WzFrvB/XCjjjrSnHouTMxxlrZhqLXCTaa20oOr2RFLxvXL5da0WTVPxmNKjyR4rY ZePUlpszqPe2r2+ycrhD3M9OmrDtg5NVaZbmVq32KwPMykfUJGDA40Lr8bgoOssEtoRM eNfwjLYYZTALoTeg2KdRKhd4b1ilZasmMG64S6O+uMzw/0pdGREG6eMRmkEiC3l1yL7C razO3MCR8Q78pv+IDNmds2Tx8opQrGXvhVhqTkEhrd30DtLTuK7Zjlm+lUhb36jY/Mfr QWPg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vy1+puffmn16sN84vWUlH8apbA9RQ9EH4QWsJCDUDgM=; b=PVd9Rw589gpMcU+P03gT+unp3YtqbGPuhRhltXxkwnBZiBl+euoLuh9JoEGNtOG91B Bn2HT7YALIvg8fId1Bi95ET4cXcXYzFlzUUWukoHdWxD0+DllqvmRnYt283tSHRCwAqx VWhmNzuFajz7evqXxOPsRe4K5PQG2MfbmbPkjF7g1RA3F2Qi41MVCMUUXM/Xo3MHdN/n JL+vnRafVDIN4AGHP2urPqcZKmFX1cveA0ZkFZ4PMUq1qJrskAlz0Tw2j8fOM28gZPcR 7DNeYrXEvS8RdpSVGf4tdDw+Ds09RHgE+x5ZNeSv8f+gE+Yf2Yul/oDEv7sWC3LgkVy7 7Odw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PnM04IYy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g98si16393268pje.92.2019.07.24.22.43.52; Wed, 24 Jul 2019 22:43:52 -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=pass header.i=@kernel.org header.s=default header.b=PnM04IYy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391102AbfGYFnv (ORCPT + 14 others); Thu, 25 Jul 2019 01:43:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:58856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391096AbfGYFnv (ORCPT ); Thu, 25 Jul 2019 01:43:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B908F21850; Thu, 25 Jul 2019 05:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033430; bh=zY0UsNUuEJdMOZmq3GwU0pCwGzFJPeoyFllKkKPO920=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PnM04IYyQzFVT9S5GeaOz84Efjc7NTGJT2TxiZIXdbyxANQMt1MZjcRUJMN0aQzRq Cm9y6WgnFZjlYyn60vlvTifS68uYOGeR4pisZZEkseg6mwciWI9owAgXdgVlms/JFp lI1u1EcaBqUTkxCXykDptMA1fsNuHQNrHdbtIwGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown Subject: [PATCH 4.19 204/271] ASoC: dapm: Adapt for debugfs API change Date: Wed, 24 Jul 2019 21:21:13 +0200 Message-Id: <20190724191712.575607776@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Brown commit ceaea851b9ea75f9ea2bbefb53ff0d4b27cd5a6e upstream. 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 Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-dapm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2139,23 +2139,25 @@ void snd_soc_dapm_debugfs_init(struct sn { 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) @@ -2169,10 +2171,10 @@ static void dapm_debugfs_add_widget(stru 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)