Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3994137ybi; Mon, 29 Jul 2019 17:05:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXXnSSPaKBx7KR7vgf2cFwqLQ4eMBeiyp0JvsaKWpfShyKgCeUwCeGuceFiYUSXYNecgcA X-Received: by 2002:a62:174a:: with SMTP id 71mr40309803pfx.140.1564445124047; Mon, 29 Jul 2019 17:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564445124; cv=none; d=google.com; s=arc-20160816; b=PpclYW6gpSBaKxpbgW4g7z7W3R76T6ejywUF6TWsV61M5HPxQJP6Dkzl6P62UfPB1U f2zjdAvBMpvR8fC2+UMB9VUgap7UlGwDniU5bwLibFbZXhavNc0NrsAinPUN8wMVvHTL iez1+VspxeF8BcyEN2uXK8S0gAqGyTK7vUPENWfUH++7w9MGjeAst3B0OcBEJUyepujC UexSPNfiscxRr+SdWKAiUfmRpIJ8BiGC4xSn3hDSCbAw+IIyb1+UeN1AWURutr6ZtL4J tND81/oKxgyj+QD9hHr8LSJddK98bnl64HqZYIUOE3Ta6/2juTXF7vUL7doxFI4P9zbf /tsg== 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 i32si24657016pje.44.2019.07.29.17.05.09; Mon, 29 Jul 2019 17:05:24 -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 S1729264AbfG2Taq (ORCPT + 99 others); Mon, 29 Jul 2019 15:30:46 -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 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 @@ -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)