From patchwork Wed Jul 24 19:20:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169638 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10654726ilk; Wed, 24 Jul 2019 12:37:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEr1E79QoxbhOnSlwB9RiBfnj1QcYDR6VaI074L30GZJ0IrXcXKtM6ydsiN00j/k5rAInb X-Received: by 2002:a17:902:7087:: with SMTP id z7mr36126480plk.184.1563997074144; Wed, 24 Jul 2019 12:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997074; cv=none; d=google.com; s=arc-20160816; b=UZ6rfcogb+VBhSCGk/V61+CT2zGnseyG0vCOtIarXOog4dJtSuma1DVJkhjJ30faX8 uOdntHlv3rpFPY0LU9DwFKnundQAOk4edAB7FdNaWyIDpdANCVvHk3GNgjB0Z8zAH7vJ 1ZpdNgtlzWl/QR2Adwhlwi6sQzY+qT8LJ8IgjyJRmCBlruzE1RqTCGLHhXzs3JTM6IFN mUYQwI5Xy0L5zc8iUkCBwsgkg/tWZN1Ak8h+FPz7AlH1l9bo6qckckGJWo/RaD8UmCa6 mXmuj4AdotfgUhYqfwofDbDr3tPqjV3Fiq2YfURTQ8GaEnh4MUFQxHC/90RzakFiBPeO 3EdQ== 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=fe+p10YfnyqcFUyaZQKDg/pc4hRRGQ7ZskTdE32j60w=; b=SRaj1/g3RocZTJXm7iHuqWMRNJc4pLVs1pm345mHceeflx00g7hGBq6ZOcKC74haBc TGfoIow7fpcsLyUkoIZQ0AHu6lmfRSfMNZByOQGxCf7mXFi0zjY11LiyzQSXdNU19k6t ezhPFbo5sTyBx8srVp0sygulmkUu06v3uFJUZMxYiEucFSfRVI+o4oxbgrOEGGqJewsK hlO3ykBFi24IfHuojbUk75sRbCiHnGavXWc5WU1jS7vXX/wLyetlicL/z2elNTqsHa7E vko9rUvFj5GhAeX5td5qyYagtOSuqj5hzBJeiKpSLotztI4jDaGNAM2eGa3m443Pggrd 595w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UY3rwoUL; 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.53; Wed, 24 Jul 2019 12:37: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=UY3rwoUL; 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 S2389536AbfGXThw (ORCPT + 29 others); Wed, 24 Jul 2019 15:37:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:38166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388939AbfGXTht (ORCPT ); Wed, 24 Jul 2019 15:37:49 -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 31D5020665; Wed, 24 Jul 2019 19:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997068; bh=2HnvleEuQXWEcpKX9BILP/+xkRxnVYQLF0R4G6X7+yo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UY3rwoULXTC0+s2kh/1yFUHtwPxpqZVG5FGG5kcKvbdSGVBc0urZuG+UhygTfdn7c n7MtjV3Mi5cx75w/Dip6IemMS/CTHHfZ3YDcwyKjrkIsi/gRlTJQa6yu/H0g3XhS+t /FWdaw1Fkf8O3ZicnwAemLh4CpgD/mSRLUwWQnNY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown Subject: [PATCH 5.2 311/413] ASoC: core: Adapt for debugfs API change Date: Wed, 24 Jul 2019 21:20:02 +0200 Message-Id: <20190724191758.010507754@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 c2c928c93173f220955030e8440517b87ec7df92 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-core.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -158,9 +158,10 @@ static void soc_init_component_debugfs(s component->card->debugfs_card_root); } - if (!component->debugfs_root) { + if (IS_ERR(component->debugfs_root)) { dev_warn(component->dev, - "ASoC: Failed to create component debugfs directory\n"); + "ASoC: Failed to create component debugfs directory: %ld\n", + PTR_ERR(component->debugfs_root)); return; } @@ -212,18 +213,21 @@ static void soc_init_card_debugfs(struct card->debugfs_card_root = debugfs_create_dir(card->name, snd_soc_debugfs_root); - if (!card->debugfs_card_root) { + if (IS_ERR(card->debugfs_card_root)) { dev_warn(card->dev, - "ASoC: Failed to create card debugfs directory\n"); + "ASoC: Failed to create card debugfs directory: %ld\n", + PTR_ERR(card->debugfs_card_root)); + card->debugfs_card_root = NULL; return; } card->debugfs_pop_time = debugfs_create_u32("dapm_pop_time", 0644, card->debugfs_card_root, &card->pop_time); - if (!card->debugfs_pop_time) + if (IS_ERR(card->debugfs_pop_time)) dev_warn(card->dev, - "ASoC: Failed to create pop time debugfs file\n"); + "ASoC: Failed to create pop time debugfs file: %ld\n", + PTR_ERR(card->debugfs_pop_time)); } static void soc_cleanup_card_debugfs(struct snd_soc_card *card)