Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4293911rdb; Thu, 28 Dec 2023 17:47:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRhyq8wlkrforWWUas2pOeTzLWewiHZ1LD4alCxwIjNMy/xgJyUGkTuD1xi39dDg/m9uoZ X-Received: by 2002:a05:6a20:138c:b0:18b:4a28:6e15 with SMTP id hn12-20020a056a20138c00b0018b4a286e15mr11206904pzc.34.1703814438884; Thu, 28 Dec 2023 17:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703814438; cv=none; d=google.com; s=arc-20160816; b=X2O9I4G8AoJlEBLPLfAER7/EGXJSNqgaSTYqD0gK/IqlQJ2PTXslUGTwLfyEmq8TgB hhiZIYkf3RwKZK/jQcCiE2gewxRNFrCmRPJimYdH3KYsfqBiO1hB8zR768utu8sTYjEg VufCiRD8DbjvgptoizBDggV1R7y7TYShupWB8TYFpMrMxY74cLWmhbS+hxgZOO2PK5oQ ABg1oa0AqyLeR76FFtFOHFEENpWELAAhEIQ1bnm7WUp+kbw8LAxXAc0zBA664Fmp4EXs ZbwYIye4b+oXzcdER+kQ6Iyn5bV75zTTy5ZA6+jGXTcYgHArcxz4DQ27bJrLUHsgGjKD K0ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from; bh=cA3ir1JZPZQO6qrKszd5iyrDApxvpfOGmAKHOm//yCw=; fh=LPiWBm6ez1s62qjfX1mCP8Bw9lbBkf+R8zBitlrM48g=; b=R+XVy1WdPBUDFjjzfqLlFTwLae4n1ktoFpgN+p6+VoLVs/Fy+ml+DQz6urpasDq84w EpFe0m4RYqiar9f4vIEZqND66b0igtHmzWJhAkGWPHT28qMAKLpuEjMqoYWkaRBlELLk pG5/XsQgLN5yMWoivNCWta+ktqUVcRuVeHPxtU6j2ZK53KpX8ulWbCq/FwmVxsfRH3/G QMQ4OmfrNgnPvmGpS4TNFP/B5V8zJtrg7YI4noqVvwO5uneXVcSzwogi8VqMiA7/uSpc 0ZK2xLayQ7eEsdJQL9smjWNLr+qKtU8Z5TeS6H+QXQRd6K29Dm9vEYB+TEA9PJN0PVzB SMqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12908-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g13-20020a17090a128d00b0028c347d3bbfsi9839444pja.44.2023.12.28.17.47.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 17:47:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12908-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3054CB240B6 for ; Fri, 29 Dec 2023 01:46:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21D2546A4; Fri, 29 Dec 2023 01:46:32 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C9DD23B4 for ; Fri, 29 Dec 2023 01:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=richtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=richtek.com X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(636808:0:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Fri, 29 Dec 2023 09:46:03 +0800 (CST) Received: from ex3.rt.l (192.168.10.46) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.27; Fri, 29 Dec 2023 09:46:03 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex3.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1258.27 via Frontend Transport; Fri, 29 Dec 2023 09:46:03 +0800 From: To: Mark Brown CC: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , ChiYuan Huang , , Subject: [PATCH 1/2] ASoC: codecs: rtq9128: Fix PM_RUNTIME usage Date: Fri, 29 Dec 2023 09:46:01 +0800 Message-ID: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain From: ChiYuan Huang If 'pm_runtime_resume_and_get' is used, must check the return value to prevent the active count not matched problem. Signed-off-by: ChiYuan Huang --- sound/soc/codecs/rtq9128.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c index c22b047115cc..bda64f9eeb62 100644 --- a/sound/soc/codecs/rtq9128.c +++ b/sound/soc/codecs/rtq9128.c @@ -391,7 +391,11 @@ static int rtq9128_component_probe(struct snd_soc_component *comp) unsigned int val; int i, ret; - pm_runtime_resume_and_get(comp->dev); + ret = pm_runtime_resume_and_get(comp->dev); + if (ret < 0) { + dev_err(comp->dev, "Failed to resume device (%d)\n", ret); + return ret; + } val = snd_soc_component_read(comp, RTQ9128_REG_EFUSE_DATA); -- 2.34.1