From patchwork Sun Sep 6 15:58:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Gu X-Patchwork-Id: 3206 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id E83A31C05C0 for ; Sun, 6 Sep 2026 18:06:01 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25637-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25637-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 0D25B32532 for ; Sun, 6 Sep 2026 15:58:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 125533AA50A; Sun, 6 Sep 2026 15:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DJEuCEsM" X-Original-To: linux-sunxi@lists.linux.dev Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC95A3AA1BD for ; Sun, 6 Sep 2026 15:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788710332; cv=none; b=ZdsVCHRlQErGUV6Tn45yfb5junrQ3oSObj8zDGs/+thQYw25XM3zkBF2L3Ne5OeRLBGKMJFcmL+nI8O81IQG8+f62AZQWh0Q7nppbdDa5dy/iqaaVej3xRTT7yyWQz6f7++mlFl5sdxl4CKC0JGxUj1PXkZCxRo3m+QuilytXn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788710332; c=relaxed/simple; bh=c57ka5j8TQHkpX5FZRHB8vFerQ2Ws0Z0sbVGbrtSoUw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KbQY9/loxYAnBU3GkohNSEt5TGDP2ndisUq8bfAPo4Hkwyd2goaCu8RAxs4qh000Sz7NssrIUaw/DFybCkdJJrKX7s6cBdfcHSWJWO3rKOWVmXJ7YhI6yqbfcYil0KOjHL9GCZzjuxWkI0MHkVlbXIh6Y7bHLejHEkC9fB5+5Ho= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DJEuCEsM; arc=none smtp.client-ip=209.85.216.46 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 Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-398a5aad413so1941606a91.3 for ; Sun, 06 Sep 2026 08:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788710326; x=1789315126; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ViofCTK8v1s13H6Q1s8S3TeyG55pxUNWw4j4G5OCidI=; b=DJEuCEsMg+dzojJEhpJYocWlYouBifcRpNqIcyxW8U82DhvIMsQWg3w3W5LczJ0Y0a QU3yBcEEJn5opu4Co3Da+vQsinzikgScwoq2EHYMy0qSqzdvR973kn0YK0Fk7+OWrWiN qPXMW9oREFCMfKAvALT/3RR4Hsu0VP/xTwbR3PTVAcmw1upYjP2ZFC1M8VaSynCkp9Ui JlPezKm6INTEECt1Y07F8h3lrBVGMDo+YTu64n941DIjoOuSWLOHzBxIfzJWC1Q3VPBQ Ri0h8fbFB8Pccagm+15k8MzJPnLYKeahAm5GdRV4AgcU2BMs6XrzPOvOOJuTa9wf0fmj HGxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788710326; x=1789315126; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ViofCTK8v1s13H6Q1s8S3TeyG55pxUNWw4j4G5OCidI=; b=d5uoZiC9SbavqwNl8PJO0pVO7HGuI6XDTN7Pquqsz0zQEjQ72qsq3+ufRg2GVSR0Z4 M7vdjwYkCGaQvqLyaBl6LSaki6Eauji7Ol73J7s2w6PLZDFk+MrhZ45x9IZ5ctPT1KN1 ci/zh9CClDlYUQh97uR2rdzeU4f6pbEOwO18nNxVmeF8PUw31n8nbYwZuBczi3B+i6rC SDT/Hj/KYkAimS76b+o5oMdbP3J+UAlU2eLNCWRmJE2S69EqSk8v/W9UA2N/Gpu9QQfO v4L06o0rf0nSkKet/s+Gsi4We3aOzAL9KyULEcYOGS6HqgcRrqfSLO+6EX/zMwC4KYrc 8pvA== X-Forwarded-Encrypted: i=1; AKwUvBw6EaAjf4g4AUsMVm0k/9mAfsn8rk4rnH6cM9As1Ez3aSXzsnWINkJltacyvtedM7x3GZP7mVlKdqHj+w==@lists.linux.dev X-Gm-Message-State: AFuF++ldWI5M6IfsHmsz56eP7M04zpSfLHuNbzgqBgziwbInQ1EzJYK4 DKc2aq3y+rya7RjLsjaZTDZgZw2qEV8yklGKTULaCTGkGnip25RsQsD5 X-Gm-Gg: AYBFou3WpYjC4dr9+LiuOzIg5H2NeNe50drG3aQSAb2g6rEo3lbwWE+ZbfRKN/xcwOn fw6ojlyOeHESyindl6VrfYrtx2Wy86jrv5+sfdrVFoIU+SsRY0va5Tk2lZNqina0BK7lnjrqSLT xEviG4go/Rk9L8YLDHoCypPgiboPl79qYMPlpJV3nMBmHq3U7o8skGplUO44rYxrTHn//LPEYaL rbzBSV0bmYIITdeeUQvNRWwHmWOu3hLe00SI2fATsw5FQGsn+Uu1Xk4Cx6oEZ2JAzcBwwhEJUKp mtN4L9/jUr3TdfVmNMfVHvfwY8fpS1HGlonx8J256BufcjbnKTcnY6IvR6Z1TkEkKc9/GqWvZWq 2BX4uPHHX0dnQ5XlF90n/k3XDeVPcrM2K17Wg4Dw82kIqQvZiGUmhgxr2uKBCOtnbQXJmJDUmtg RBUo7TA9mUHDUvwuzCosN+D+nTUCOETsFLJ0hNWeCRLXn0OLmKQt8dNaFY+5RbsO9nTpnVlEJ3w VKiYBGm7oAFiFYBVc97X9dp7yo0MPdK/FkMmE1LP51UN7vVw0i9DTjIrztggClHCoc= X-Received: by 2002:a17:90b:3852:b0:38e:9ef9:eb97 with SMTP id 98e67ed59e1d1-39b26272d69mr27665796a91.16.1788710325448; Sun, 06 Sep 2026 08:58:45 -0700 (PDT) Received: from junjungu-PC.localdomain ([223.166.246.74]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-39b260f64ecsm15941401a91.8.2026.09.06.08.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2026 08:58:45 -0700 (PDT) From: Felix Gu Date: Sun, 06 Sep 2026 23:58:34 +0800 Subject: [PATCH 1/2] iio: adc: sun4i-gpadc-iio: drop underflowing pm_runtime_put() calls Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20260906-gpadc-v1-1-92d3dc8ef355@gmail.com> References: <20260906-gpadc-v1-0-92d3dc8ef355@gmail.com> In-Reply-To: <20260906-gpadc-v1-0-92d3dc8ef355@gmail.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Quentin Schulz , Maxime Ripard Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Felix Gu , Jonathan Cameron X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788710316; l=1267; i=ustc.gu@gmail.com; h=from:subject:message-id; bh=c57ka5j8TQHkpX5FZRHB8vFerQ2Ws0Z0sbVGbrtSoUw=; b=RK5suJBjW/7xSEGUZXgfUBlPW2TReDkIU+aOrloVKr3mhcpiAxpWmhUE7ZU8jgfIYEVZ2MO7Z ioAF8OyoqLhARn7gFPEsWticTsfzL14FepGKSvjltcW7wOLyhMyhCXH X-Developer-Key: i=ustc.gu@gmail.com; a=ed25519; pk=fjUXwmjchVN7Ja6KGP55IXOzFeCl9edaHoQIEUA+/hw= X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Neither the error path in sun4i_gpadc_probe() nor sun4i_gpadc_remove() ever holds a runtime PM usage count. So the pm_runtime_put() in both places always triggers the "Runtime PM usage count underflow!" warning on every failed probe and every unbind. Drop both calls. Fixes: d1caa9905538 ("iio: adc: add support for Allwinner SoCs ADC") Signed-off-by: Felix Gu --- drivers/iio/adc/sun4i-gpadc-iio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 203459ca9907..85382e435f2a 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -657,7 +657,6 @@ static int sun4i_gpadc_probe(struct platform_device *pdev) if (!info->no_irq && IS_ENABLED(CONFIG_THERMAL_OF)) iio_map_array_unregister(indio_dev); - pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); return ret; @@ -668,7 +667,6 @@ static void sun4i_gpadc_remove(struct platform_device *pdev) struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct sun4i_gpadc_iio *info = iio_priv(indio_dev); - pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); if (!IS_ENABLED(CONFIG_THERMAL_OF)) From patchwork Sun Sep 6 15:58:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Gu X-Patchwork-Id: 3205 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 3D0BB1C0726 for ; Sun, 6 Sep 2026 17:59:13 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25638-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25638-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 18201250F7 for ; Sun, 6 Sep 2026 15:59:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F66B3AA4E8; Sun, 6 Sep 2026 15:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nbSdTGyp" X-Original-To: linux-sunxi@lists.linux.dev Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FDDB3AA4F1 for ; Sun, 6 Sep 2026 15:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788710336; cv=none; b=bjdmgeINNKgbuPbi0zEWhMJR9p73EiSmA8mzJonItOj9uM63nGX0qYijSrATbB0/ijYFaP61S+dc3qPNJWWUm7OSlIsj2E+ci4x4+fiulQiVFVojLCSxRZTRcxStxeN4JWtkt1YNb3ktZv9zkA9FpuT2/R8DeiY3Gf4EnKpD+yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788710336; c=relaxed/simple; bh=Wt89mC38z1SB+RdqE6/iGje4kTh6KTtVF8QpLkUZBJ8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PR37F7G95avZEaSTKeMCpVzpx2QYdwB4kH/dDxLGFGBdshyZq2Yw7VEJg9NUcOZ65S/I8sjpIUh2t9hWYXpzii1dEK+usULmRhhNMDC8scViQmcFh2RXDJCybyW93rcuN/IznoB/CRNj8WA/YuS72Zf7hJ14MPPWk73bMHXCQDE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nbSdTGyp; arc=none smtp.client-ip=209.85.214.178 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 Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2cf452def93so31646565ad.1 for ; Sun, 06 Sep 2026 08:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788710330; x=1789315130; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=F0nEO3AVU8BdN0/yPVQNPwgB0D96TiBKB6Di1KmEt1I=; b=nbSdTGypt2KyNkAhBSf4mjUvM4SaarPBA6cx2bp/TUcRR6nMpwdBTp1qnK1oHZh81B r3nZAu4svXbigQ2ywtTJhj2M7OJS81tv0FMtDt2PXhiLSK+aB+hD6oO9rYc98mqpEGMs IxkGVgcGTYEQwGTi4J5BBIBJneDbKEIHoYqpa9u+FL584G4LTDKco04hkkMIuSGr2sd7 TMrw46oIH0wz+7/D+7J9wIO7chycgVLTE4mzbqSwpWum4o0f996YA9EKbQRSFw3EKK8V P+3u3+dNRrHs7ePTxdFGR1VfasXvhOTb1KPUgWRYBh2L1MPgxSULd5AmMBY5LhWEz02x kN0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788710330; x=1789315130; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=F0nEO3AVU8BdN0/yPVQNPwgB0D96TiBKB6Di1KmEt1I=; b=oU1gEqNLM8jvhaPFh7psAElLOubGgnPRuC3sNynA/TIca9QIjQuKbhNP430I8a7CmZ 6fNB+8ZM2rGKc8Ta8/R56iRXGktll8Dff43d1pBYM5FRBsVcDZiT+Co8h0Fn4OGDErxc z2RjLbr8wshO7pinkcz0+TNUTeirZEggcqcs8+S6evLcTRA3QwQILpIoIPKbRzJZWnUx nk42q5pfCjREfvCBYf1pdXqOxIcBGDm4x1VeyinOA5s8r4QYkkFXWxjqzQFLDuKFpl+/ UbZY6SqO3UxYXQy8RN4cxELXxnwe35J17x5FeOoH09xRwKjVPfJzeEw8aG669zipXy7u yx4w== X-Forwarded-Encrypted: i=1; AKwUvBwk0u51qoCM9KZ631SEVx1QyndNNhaNjnHlUTuVTYNzJEofwK6A/4XpVVqwqUv8tjw54D4bNyxHVYF2Tw==@lists.linux.dev X-Gm-Message-State: AFuF++mwRELtKJfugGEh/VLVEaEWsXGQqefgVr2wOTSCcZ6O+qYFxiLX UZcbP2roDRJ0FVaoNxHm6bN/XFcHmE/dU8jKipGGIfiDJVAFnQKKEBNN X-Gm-Gg: AYBFou1mGAGw/Jp1dHDJDRaxyAJxMlPte1s/MwwQ7xu89qfUSCslS8wIOggpjQxOuJv jcWRc4A2E1KCfer8caFtQNM3SmDNZRqeBvG8Ih48rRJ7dNmVwUFqtO4qfRDeBmT4HYu0aFZskH3 tYz4DW+b+5EV2yMMbVhLlaoj4yMeYe/R7Rf6FFETpY0/9gf6+Q36JkUjgqZ2IX39YNLcH9DONKv OYzvSjG8SQxo9uOSlWRiCNP6ahJJs/AHIoyRl+hEyrf56s5Fk1oIfd9EWlj2gFOY9BA83tPr0zO qImh2CtU9zCjH84lXYsoDsinpgfENgsqzvss20EKWV4y/dgG86yEYqbQCfDbM13MEoYg74AzsjZ Wj5bxGg3xuFPkpq8j9rT/glqRdB9rIemX3neHWWgkWlXxmTLZKmgbW/O+Nhms7Mo/5cD6c/vQ+z ZrGDahltnseb5FVU4gCjU4dRrcXf2lwowhwChRKwtxIHWaJJBQ0MglZIflWhyWIY2dxc9Dg72Za lDCZhVRq32WdGlcvQip0DeORIYpUBkvNOdzRqg9/9XbKjtCnzvd9JAQ X-Received: by 2002:a17:90b:5484:b0:384:927f:3db9 with SMTP id 98e67ed59e1d1-39b27c0fa43mr13496195a91.1.1788710329826; Sun, 06 Sep 2026 08:58:49 -0700 (PDT) Received: from junjungu-PC.localdomain ([223.166.246.74]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-39b260f64ecsm15941401a91.8.2026.09.06.08.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2026 08:58:49 -0700 (PDT) From: Felix Gu Date: Sun, 06 Sep 2026 23:58:35 +0800 Subject: [PATCH 2/2] iio: adc: sun4i-gpadc-iio: clean up on thermal zone registration failure Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20260906-gpadc-v1-2-92d3dc8ef355@gmail.com> References: <20260906-gpadc-v1-0-92d3dc8ef355@gmail.com> In-Reply-To: <20260906-gpadc-v1-0-92d3dc8ef355@gmail.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Quentin Schulz , Maxime Ripard Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Felix Gu , Jonathan Cameron X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788710316; l=1124; i=ustc.gu@gmail.com; h=from:subject:message-id; bh=Wt89mC38z1SB+RdqE6/iGje4kTh6KTtVF8QpLkUZBJ8=; b=oha1atVR2mqFYHAgjPpNIY23PNkzfXFXSgJrMheeJEnqaNoYl3svWtK+Ma/SC+uR/OUo2QZH3 3h/DIP34cd5CTKVMzJcWpueUg07gLh1FmVc3T4LYCLOKHZWRSurCtUr X-Developer-Key: i=ustc.gu@gmail.com; a=ed25519; pk=fjUXwmjchVN7Ja6KGP55IXOzFeCl9edaHoQIEUA+/hw= X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.34 / 15.00]; RBL_SENDERSCORE(2.00)[104.64.211.4:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; PRECEDENCE_BULK(0.00)[]; RCPT_COUNT_TWELVE(0.00)[15]; FROM_HAS_DN(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sin.lore.kernel.org:rdns,sin.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com,kernel.org]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[ustcgu@gmail.com,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-25638-noreply=patchwork.local]; R_SPF_ALLOW(0.00)[+ip4:104.64.211.4]; FREEMAIL_TO(0.00)[kernel.org,baylibre.com,analog.com,gmail.com,sholland.org,free-electrons.com]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:63949, ipnet:104.64.192.0/19, country:SG]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 3D0BB1C0726 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= If devm_thermal_of_zone_register() fails, probe returns without unregistering the IIO map array or disabling runtime PM. Jump to err_map to release them. Fixes: b0a242894f11 ("iio: adc: sun4i-gpadc-iio: register in the thermal after registering in pm") Signed-off-by: Felix Gu --- drivers/iio/adc/sun4i-gpadc-iio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 85382e435f2a..ac5ba76b979e 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -638,10 +638,10 @@ static int sun4i_gpadc_probe(struct platform_device *pdev) * thermal because no thermal DT node is found. */ if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) { - dev_err(&pdev->dev, - "could not register thermal sensor: %ld\n", - PTR_ERR(info->tzd)); - return PTR_ERR(info->tzd); + ret = dev_err_probe(&pdev->dev, + PTR_ERR(info->tzd), + "could not register thermal sensor\n"); + goto err_map; } }