From patchwork Wed Jul 24 19:20:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 169637 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10654679ilk; Wed, 24 Jul 2019 12:37:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqx01laofBeTo3u4fHeacH8wrYh0BylNRjZx93qmptVdjwr8EFUgxpEtCpMwfwcdZu0nOr8x X-Received: by 2002:a62:b411:: with SMTP id h17mr12327222pfn.99.1563997069782; Wed, 24 Jul 2019 12:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997069; cv=none; d=google.com; s=arc-20160816; b=qR3Mz3ACLeZjiZmysIh+2KP1MO5duln22fK2c0Gk5/ol484idLBPwzqdGH4P4bkph8 Y2wcBNGI59rW8i1zobG7Jr/4R60oAGLZsp4tsH0Nv9FyyjQqqmSa3e6xLaUgPpQFGZl3 gGPQo+xfKsSxS1DeJ9/vhMBMysjhFNM0NGt7vUrtv/oPb/ZdCMIQ0K12rLnXsbj/E/8p djUwcPI09oottMUChGF7fAkHoLtzXHAy8RfvZA40/17o1hBfphw7SNyGR+J6wXBoqBTL K6AdHYtwsT6oT0gREFetWzaaOwOKPc9Ka5FMFXMjx7wdLZM5A3HzxwBn0vgGbJDOo55q K1JQ== 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=EABL7CmIo691Dfo8+XtO0ZyCRY2ddydBJIiMtCnPnqY=; b=i2+/CDjCq8DdNWaTet7cWre1KzMfV0Uspj3iBVS9u4DdJhJMPozfPTBF9wsd4wP/gM Mg7e0BOrDOEcdfgJPSS05xfUe7EYHsJovLRvCWtjJoN8xeEnwotTsZbWFr0WnAJu6k79 3P31dbf41Ahj5GLkbws1xU88TDFc5Vm5efvmMzTOEdvjuc/JMdVGEfdRrFyAVY3hvHst yXKx1+AKStnzwGXtvN9lVRqD/koBfPbJKiyXJJDS91pUqv4X/MAqxQdDd0a8li8Zvyxg 3cf34m1Ub95P64ohoaRC/w6ukY3qv6MQ7QjHVDWTIRx9j/KLs/PNOqsdrJYdadh9miPg NGDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ytGCzFmO; 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 x131si17860759pfd.116.2019.07.24.12.37.49; Wed, 24 Jul 2019 12:37:49 -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=ytGCzFmO; 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 S2389521AbfGXThs (ORCPT + 29 others); Wed, 24 Jul 2019 15:37:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:38068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389512AbfGXThp (ORCPT ); Wed, 24 Jul 2019 15:37:45 -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 A260F20665; Wed, 24 Jul 2019 19:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997065; bh=/K8p8bk94uWfx74QDvrAiJkViwJ0FKebaIXNiDp2qYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ytGCzFmOzk1dIMLbDCKgKPY7BuGH2/3eQqNDFhNpmQE7m+8hHdm2zDo48jVn6GLaP 5fz7DANSiS2NTuolOd7SUDPGlMBPK0WYuUxK62NwF+St/Y5arth2CKHJNQ3eEKdvf5 sdrnZ4sOca0y0qUd67m36ZWSGIeNJJxOJ3YHDei0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown Subject: [PATCH 5.2 310/413] ASoC: dapm: Adapt for debugfs API change Date: Wed, 24 Jul 2019 21:20:01 +0200 Message-Id: <20190724191757.934708464@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 @@ -2155,23 +2155,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) @@ -2185,10 +2187,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)