From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C68D1C43334 for ; Thu, 16 Jun 2022 22:04:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378455AbiFPWEo (ORCPT ); Thu, 16 Jun 2022 18:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232055AbiFPWEl (ORCPT ); Thu, 16 Jun 2022 18:04:41 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC1E75F257 for ; Thu, 16 Jun 2022 15:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655417080; x=1686953080; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8yDu8pljCT7lbter28rnZGmrSNHwi6FSg6lKKzg7Hfs=; b=MA+FjrAYMxkDv176CrJhQ+anztTLRxnBFMtKnr07rEO4qH1V94uED69E AGmP0YkfArH9ntKbURyhWiahxwykopgKK9U726XIULqnKXAuR3+pV89cf ehxkCE4l6Vix+Joj8HxKiONp2LfjqkSTwvvuZNEJpLkVI8K2l2J/zMEPv CezMeuVKa69fcnZK2x7mgzo7aq4kbiSkpOZ3tBGjUAy8eDQ5/TU5Aonza ggxcxWgOiglJlcTrnRh+Q8b/7z+NevtSr9FLzj56It9NihVzmAMF/GV9F /ogeJQfBSvDtQsToMBvwAnJceanXdKLkwpfpUicZEUXLdKJMLT3CnjTew Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="276936398" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="276936398" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 15:04:40 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="728084970" Received: from buckkenx-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.52.70]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 15:04:39 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Cezary Rojewski , =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Pierre-Louis Bossart , Bard Liao , Kai Vehmanen , Ranjani Sridharan , Liam Girdwood , Peter Ujfalusi , Jaroslav Kysela , Takashi Iwai , Gustaw Lewandowski , Thomas Gleixner , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 02/11] ASoC: Intel: skylake: skl-pcm: use pm_runtime_resume_and_get() Date: Thu, 16 Jun 2022 17:04:18 -0500 Message-Id: <20220616220427.136036-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220616220427.136036-1-pierre-louis.bossart@linux.intel.com> References: <20220616220427.136036-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current code does not check for errors and does not release the reference on errors. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan --- sound/soc/intel/skylake/skl-pcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 55f310e91b55c..9d72ebd812af9 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -1380,7 +1380,10 @@ static int skl_platform_soc_probe(struct snd_soc_component *component) const struct skl_dsp_ops *ops; int ret; - pm_runtime_get_sync(component->dev); + ret = pm_runtime_resume_and_get(component->dev); + if (ret < 0 && ret != -EACCES) + return ret; + if (bus->ppcap) { skl->component = component; -- 2.34.1