Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10424935ybi; Wed, 24 Jul 2019 23:00:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYKGD5w5R/wEcgsg2FTW9MkAbZmzI5xCsVe/RI292YqNprRmUpkyGaUgjo3HGmqvoKTJqJ X-Received: by 2002:a17:902:be03:: with SMTP id r3mr90329245pls.156.1564034407246; Wed, 24 Jul 2019 23:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564034407; cv=none; d=google.com; s=arc-20160816; b=e8acLJqFqbLluT29cw6K93mR0j2l9JxBe8AkrUffeI37QzdJNrKTBats9Rz3QrYHHN Q4ljqn0VPOrcP0uDzD33N/gxU6hRarb3BubYXXw8XSEK+8Ir9cUdP5CqpBK5ocxBx9Wt JDKSstBDdwkqCDC+Ffaet5MLKUwzYAr2ZFqLv3liCpky/OpSSBNxrImAJjfeO4t6QzVS UyltXHgpAkmE5a+6LWNa6GH97a4PPgt/3RYEKv+4jErPk6xOrCy/zsp+W+5FQR2/ecuv U+cr1Lq9j0NjmSWF9DgIZ5YbbhY0AZm8GhIJv9asYwvOy3oPtFtWggntxKEVJDMHG8A0 85qw== 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=sSPZNARPv1XdMGwfW2xoyLDwJ5MeUp71zh+CV0zBmalBkgLhK4t0qltpNtEjrPv5JL XjFTIl+w6Y9e9Izhycxv940HAzM257EALFDycwMRjhJkUF/HRuzNDh3cqpiXd+aaK5cM 3yA+MQ4OMI7u/iCYz3t4nTLzMWxbq2WpYAyo9l8qyDo2h8ygbXPHTNlLjgVsctZBPX+9 eEd0/nZJWwtMuYk37cBDzjJTYETF2BQPMfvgeflgzXn4j7rUciML5pNPL/4DO5gFY3+J 4S7/TeLoshToTDyAM3QoPR2Pj9NL4P//aUstvAEZQLpjfKlCV+rcKyvYEsnjBmprx5qo 0yFA== 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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w16si15469564plp.329.2019.07.24.22.59.52; Wed, 24 Jul 2019 23:00:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391118AbfGYFny (ORCPT + 99 others); Thu, 25 Jul 2019 01:43:54 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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)