From patchwork Wed Jul 24 19:20:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169649 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10688195ilk; Wed, 24 Jul 2019 13:13:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrxH1KG2XxH52BTVVW6Un/qeRQqZZ1s/Wp8ndT7wQFa48smz37QOpoHdnOchEGPyEsMXfK X-Received: by 2002:a62:ab18:: with SMTP id p24mr13086874pff.113.1563999187867; Wed, 24 Jul 2019 13:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563999187; cv=none; d=google.com; s=arc-20160816; b=Bd//F2FvMOlEDsDqAGgNlPzW/EqGhwb3gumB04B+lKjvOOZBU7U+tUDhYyW2x8BQDI 3MHlaayEhG5TVwQelCeaSjECcdGgJZNkrv+59qukw4rkUzUPlJzjXpqyt5eEuhV9tFe9 JLlR2kf0Kw4xgdWjGRDBFu2E6tR1pdW2yByC5oIKfaHwoyoXkgQVrtZva49hhuxiH8mD DBUwPFh18KjR6eJvJhHniEsOxMqXmx9nR7dIud6SWObIaegblfs8ZOZYuSvde0rOFZum 0iuJUiR5VbTxZIQgUke7bE03wS8T8YDcADq6AodXaCqfaXMaZPKzwdb1ael9kauLIco9 IdvA== 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=Obi7vl3LWQ1KWnZRIHh6xI3zEZ7w/0FUDxeNQH+d4+w=; b=Mf1M8PiVkr5UY3+pP3Gh/F/PaUKoqkZHKUKi65CsOf5Xkt7Dp6oPfXJjzRsmEmPcYS LNgBQls7PcNxYtaeTIof5EV0xE/17I5wL9VYCIvYiBtI+xIcER6RCpw9fWxegSorf5YH HzJjNPPvd+tdLVOs617284anGCbcA7A0QhwKBzr79Oq0yVjtN4Ip1NdEukBQwHz7m8ao gQwE2JXYE7YHbtWql7VLfEKrrNrht2k2ZtSttOyT/r9E2FFyk2qG7ZMMC6RZzjwVzC3n 1+mEykCjxdfEv3uDuoOUKeSJvd7aHA6ZHPZvvrRnbVR0wzx9xZmXc6N704l9b6JeobLm dd3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mYIEsNRv; 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 3si14611943plx.344.2019.07.24.13.13.07; Wed, 24 Jul 2019 13:13: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=mYIEsNRv; 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 S2391979AbfGXUNG (ORCPT + 29 others); Wed, 24 Jul 2019 16:13:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:41628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404450AbfGXT4v (ORCPT ); Wed, 24 Jul 2019 15:56: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 A2992205C9; Wed, 24 Jul 2019 19:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998210; bh=sekeUZsFe40A6R5S9zKi9lEAV1KgH2ez1/bzAXZ8O9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mYIEsNRvCDF8YpGkySy8BNonyxjsdNtnBvNobxW6Vdh9bFTOsIXwV3r3/HM6rwm5y JcS+LVVVkzNHKGT9QNzZilvxg4vxoHZUJ9Qx3ivxoOstKZHw93RTyYEikB9i5I4QL8 mKXmL3MejLUri/cRVpxmrAqYx6I3u/IuiY1MbtRA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown Subject: [PATCH 5.1 284/371] ASoC: dapm: Adapt for debugfs API change Date: Wed, 24 Jul 2019 21:20:36 +0200 Message-Id: <20190724191745.653534180@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@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 @@ -2154,23 +2154,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) @@ -2184,10 +2186,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)