From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796204504; b=HweYliF8A/V/ocSo1IyqWPabMZ7Vu40hjvJYJu9lKCvbON/vQM5B+V9oBTqmwPtViLoO Ah81BD8QmQXXOenIGVYDiWXAUCOA0M4RsK7FH1uN1K94+WWoyJ3/grBU5dKFurMCIXPF2 b56UoIeRq7yq1pcbxHsAv99I0HUmyIB+cZ8HBMrp/Z0SPo7YjfoP9iEXpJEmJ1UM2Wl8w 1BOCxLcvT1Owny+0fmTtqVLOfy5Q/ZfeJEdEbY8sbFOP0ZBpllUcj7OL9kzkx7w/TiIR4 M4ixWkorey4/d9gXPgjes0s+nm7c7Yx66wXbQR34mOlmvspP4ydnDpUqIzhqkrocjhg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796204504; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=/PoyJbrKePoutTG5PEP66SXHyv14FWjb/h/eQ9QANqU=; b=zUNP6wCuypISs5b06gkRDOIvxwsjoheerEudbydrTfbm28zIsPyqi0uf7dtK5mh4D7LU jam77dSivHxBH2L4o4cJE2LF6MdcAU0Ce4zkjWeV90mnsmy6jZZ98JrCUi/cLn0b2YlUK FVjzPN0/+TAeR3jP6Jix9tkgEM3G7NkYLdJ+vVgmm8PU2tFSg42QfV9GHe8nTJvnlAD2w qET5m771DZD+r/QeAouciCIGCbd0TdxZxqJtYB4DkAUt92fveurJzEWD76oKDcaFaFlhP 2obPJv+7EUzTRNjTyQ6AY/T44CWun/Jg6p+fbg6rg3W2IIMsktyGqk6UZDydtAFSpYg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=I3t89ZzP; arc=none smtp.remote-ip=74.125.82.171 Received: from mail-dy1-f171.google.com (mail-dy1-f171.google.com [74.125.82.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 412FC606A325 for ; Wed, 2 Dec 2026 09:41:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 412FC606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=I3t89ZzP Received: by mail-dy1-f171.google.com with SMTP id 5a478bee46e88-38699cf08dfso17921130eec.1 for ; Wed, 02 Dec 2026 01:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796204503; x=1796809303; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=/PoyJbrKePoutTG5PEP66SXHyv14FWjb/h/eQ9QANqU=; b=I3t89ZzPQhQuJ6rUfRWHq6ns94/chq3vHhBjhfqZmQB8n5RSVvFItEr8qWj92WCgHN rOBba74yzi3N5qwovldThPwqazpsjljmRGXMs4/CqlKmzMm6Jh33nHyoR+Lm99LYStX7 sBodP0hDDZYYli5V/fZDT1WI2BM6UD2JmvDuWoblYKuDZREOYOU2wJpHPn9q4fP8ZV8Y ju7Mx5/wBQKYO8Zh2AhPONQRPEJiSbMIHtmK5HnAT8sdALL4BUr4iajltjDofZ+wmzXd 3Em5TbGu2a1J0mcjVspoaVywvmuNOefnLivHe2HO6vXSLTJ7LctJJc62HhCKWbbVB6CX Za/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796204503; x=1796809303; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/PoyJbrKePoutTG5PEP66SXHyv14FWjb/h/eQ9QANqU=; b=pwpvH1jPrOmkPD1KD04OOfRsedzLBw/f9JYDHIx2p8/3paUUCzW63D60j9TaG+HYXZ UQCLAPSBCoEG/r5Q4ZJ3CEhy6MzGxNhQp4yXfI0eEiONRI7iCeWxFLza2SwQHiDwrOBx UmHK31ST6OjK7vDg8Dfe2UjU1x2YXCIG6wcheBIW8tbwCyMhBGMrBnJzE9rnLa0bEN8j U8t2oTHjMSBDnioLccDjlKdRILre0tP4mXGfaOLGaACJo9VZf31zw8gcYpbZ+G+Di8+V wMlwZQ5KpN4i+RV5tGZ6UDhn4iqfGwMILWgS0cMIXwaFtDdMjI+/xU4KiNl7jOsNZgsC AS7Q== X-Forwarded-Encrypted: i=1; AL+hErF9Jy7WCXNn+FTmVF0G4pZ0ct8xiOyW9RQiE1oCNgqchAyGJmNPWji0pY247hvnxrLBBacDUKBadbVSjDE=@vger.kernel.org X-Gm-Message-State: APuU4Z+eTKKKitMG1Ae7Aql05PedRaTLFs6Yx2HNOWTvsFMwDT6ecYbm gLO/gH2hlNZ/3MYvsyLgnoiXyGwG5IbrRXoKZWvBCYJfYOcSRejESApebsbG4A== X-Gm-Gg: AZFdTZc+x8INV3ryMqWBwgjMReSmT8093DV8lV+bTiNFKN5eNxJSHWNsKyankxRi5KJ nwvcWR5ZqluKTXtOzq6YRDu0ybFi/4TWmqcoK1migFrivrrlnLTK0ZaD97wgkLJzMPWg40Wkj07 2g0me3ue4vVpLsAK29bgK1vdmwWhcOYGPUnS5UpzSZVMOgc/D0cobjEeQfu3VUw2pTVw0iz7KES ycKLZUkd5+6wJHuVbDqKujJkfo7RsJH84anxIkIxT/ocyzUZ0+ITalNsY6yAhe8GtB56doz6q0W ed3ubt+s9rZbwkfHdt8YAatQwaXyx1EpPa6u+YlqM6SGEl3zMsmJtSswZWQo6mmfkjm11xUwXkN 6Vh6zLxjN9MbDBhyiKBApGu3WnRWY+tToVqevL7cAetzaQzzzDHEzSYGB//kcmvSDiX9OmU5iPi vrcDPj7q99zLV/Tf09QJh/9kjylj2xAllT3UWVsPZkGqrPaceg7lIto7WutKl5p9G53asiZiW+L ZFdimfYMXdhLxfbPB+YcFcmAZiQ2FMVoLSAXubt7uejfGauwWyN8vDe2s2EHRQr4xEwQN9tJF5R L+2WIlgszFaU4jo0hZkI3CsQGk+KwggVl8+O+9L4x5TPkNNDKjY6 X-Received: by 2002:a05:693c:880e:20b0:386:b26b:d67a with SMTP id 5a478bee46e88-386b26be80fmr29655730eec.12.1796204503171; Wed, 02 Dec 2026 01:41:43 -0800 (PST) Received: from localhost.localdomain ([103.177.252.234]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38730405b61sm5003773eec.24.2026.12.02.01.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 01:41:42 -0800 (PST) From: Sreeraj S Kurup To: perex@perex.cz, tiwai@suse.de, gary.yang@cixtech.com, fugang.duan@cixtech.com, cix-kernel-upstream@cixtech.com Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sreeraj S Kurup Subject: [PATCH] ALSA: hda: cix-ipbloq: Fix runtime PM handling on probe failure Date: Wed, 2 Dec 2026 09:40:26 +0000 Message-ID: <20261202094026.4432-1-sreekuttan2156239@gmail.com> X-Mailer: git-send-email 2.55.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The driver enables runtime PM before calling pm_runtime_resume_and_get(). If cix_ipbloq_hda_init() or cix_ipbloq_hda_probe_codec() fails, the runtime PM usage reference is not released. Release the reference on these failure paths and disable runtime PM before freeing the ALSA device and card. Also disable runtime PM if pm_runtime_resume_and_get() fails, as runtime PM was already enabled. Signed-off-by: Sreeraj S Kurup --- sound/hda/controllers/cix-ipbloq.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/hda/controllers/cix-ipbloq.c b/sound/hda/controllers/cix-ipbloq.c index f73d6216bce3..d1cb9c01aa16 100644 --- a/sound/hda/controllers/cix-ipbloq.c +++ b/sound/hda/controllers/cix-ipbloq.c @@ -284,21 +284,25 @@ static int cix_ipbloq_hda_probe(struct platform_device *pdev) err = pm_runtime_resume_and_get(hda->dev); if (err < 0) { dev_err(hda->dev, "runtime resume and get failed, err = %d\n", err); - goto out_free_device; + goto out_pm_disable; } err = cix_ipbloq_hda_init(hda, chip, pdev); if (err < 0) - goto out_free_device; + goto out_pm_put; err = cix_ipbloq_hda_probe_codec(hda); if (err < 0) - goto out_free_device; + goto out_pm_put; pm_runtime_put(hda->dev); return 0; +out_pm_put: + pm_runtime_put_sync(hda->dev); +out_pm_disable: + pm_runtime_disable(hda->dev); out_free_device: snd_device_free(card, chip); out_free_card: -- 2.55.0