From patchwork Mon Jul 29 19:20:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 170025 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp1656337ile; Mon, 29 Jul 2019 12:30:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkgSXIQ51mymdcOZcb7xdYVu4HBrHjuXX6CXpY9xAA8HEPKtRxiEMg7iTyS2ZK40LLn5aJ X-Received: by 2002:a63:fd57:: with SMTP id m23mr40155575pgj.204.1564428654169; Mon, 29 Jul 2019 12:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428654; cv=none; d=google.com; s=arc-20160816; b=bi0k7D60mq4mk9wWr2jWNJCcr78EOLjQvVIYAM2jWtzvrUC/oT8JMPTDdyzRjyibhD VtcM0q47xsOZFacap2sSyXBZxDvITJZBPDOpU7dXXZB4Fdi2VBv/4umHeJQg+V9vI+Iy o50ZhUTRJ+dfWi2h0laU/QLlx5bc/QG09HPhdESx+YWKoJw25RRPjy880uxxaTSUWjkJ Pht86WJ0vNQNoupPcG4PBRUU3eQ/l3GOXqPIJplPMfnmhnfxqCiHERwoZKZdiKngreXR GxFXCPpM3rvLsftwuCNs72DoVoG1zTyXRgzkrmBbLBP/vhmbbo6ru04XnPzEm4w543BO StaA== 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=EgzP7/ghDBOOe9Ez5bcgc27AaKg/BabgvogFMeJvUHg=; b=wt5dfpN1hgEmsCxeOPS55swS+6MAUDebvUT15aQajjj0pXTJHolIyi3dx7wclbIIgj 7Yz67HpOUjZ4XV0+onMFOh5t6WbsYTO9qXW4/B4A6I75WYqYeIJAls6J5FYusmrtLHW7 nSeUEnj4ZykbTVyDAiIfptVhl3yvZLOn5WhMR4beIsqKTW+ilUKPHugJxeK4ueYoCQFm O9eR3fHKY1g76w7/hZF0gLmJT6OvMbr1+Z5Q1qTcm5hqx8rK39fdgokjw7hXu9bIPltv ZW3hDtnDYfn+6UoZhgyQU+7ZFZ1TA/ryM9xwRsQTovPupqtY8qQWz7CM5/zxhxd65ORy Fxeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TDDAPR2I; 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 d23si23758861pjv.56.2019.07.29.12.30.53; Mon, 29 Jul 2019 12:30:54 -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=TDDAPR2I; 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 S1728595AbfG2Tar (ORCPT + 29 others); Mon, 29 Jul 2019 15:30:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:43394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbfG2Taj (ORCPT ); Mon, 29 Jul 2019 15:30:39 -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 85F7721655; Mon, 29 Jul 2019 19:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428638; bh=cZ7HUEQurZUTQWyxwgwAlvkjhDjErbPofYKk5uukbRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TDDAPR2INTLmKzUeW58EQOqMOBn8sZt61R/Wg7jRuJT6UiAiE420JxU6eEZ6sctYr 0ea/6zDg++Yhw1DjQbqo2SZSAVFKPlX+4HOGOzOL6G62F/4iecVYDw7/0gJVo8+LDi 3HBXWguS85GyH3Em/s2gcNzGcAIr2NGR3JAimkT0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown Subject: [PATCH 4.14 138/293] ASoC: dapm: Adapt for debugfs API change Date: Mon, 29 Jul 2019 21:20:29 +0200 Message-Id: <20190729190835.122177618@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 @@ -2120,23 +2120,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) @@ -2150,10 +2152,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)