From patchwork Wed Jan 24 15:12:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 765651 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77A09C47DDC for ; Wed, 24 Jan 2024 15:13:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DBCBF3E; Wed, 24 Jan 2024 16:13:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DBCBF3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706109197; bh=pk9SStOkm9HtYlm53RC4FWe7ynG+SM2C/0oSSEXRu/A=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=A9gCogiEHudPMIOn63PYTU13IQs1LLtYrzIzUEmg0P+nzMYvLrKQDpmAhLByFTuqg gKILyP2Sg1CpQPt7zhyHkKLRhokadYYD5HHY8ABYHefUYuZqWImKCV+5NOHzqU+ori uEId8GlWRuWdo4SHzkmihVPQADsxBHwjyS9Q/LFI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C9983F804F1; Wed, 24 Jan 2024 16:12:47 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5D1D2F8057F; Wed, 24 Jan 2024 16:12:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55A6DF804F1; Wed, 24 Jan 2024 16:12:39 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 10927F80149 for ; Wed, 24 Jan 2024 16:12:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10927F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=R3u9vIWX Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O7L4cv000450; Wed, 24 Jan 2024 09:12:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=s 34WAcFS7YmLudj+Nc5iYgo1xcAFqjeqgfAxqyK01rU=; b=R3u9vIWXl/AMzsBrx F+g39TK/Htc+WQkKqRk0mH93zMTxvFff082Gk7JFsmT2Kw5a8gCPQ6qqH88Qt32j 0qCN6wo/o2xSPUZN7wz1nsQjBr9BgimjdvV72q3QHaiWa7jsle1Qbq8Uty8kRoyN cuwLuVVNJTtjVBA9QqQNAcNO97ofR0OXcPjOA7DzLk5bsJwTXQ1XOd9CxntFwOcm AEfkLr0nQ7Ipl4jp/p6Q4xh0uxuuceHsKAwRENkkpnsNnT+QHP9u1vBEzesH8jWq otFK9nQswhUSjyhuAGYw46LRT/BzXUveaozihSen1gP93KqWHxRDZmpAAfTJdTLE b8qFQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmfhgxx7-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:12:25 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 24 Jan 2024 15:12:22 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.40 via Frontend Transport; Wed, 24 Jan 2024 15:12:22 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 29F52820246; Wed, 24 Jan 2024 15:12:22 +0000 (UTC) From: Charles Keepax To: , CC: , , , Subject: [PATCH 1/6] mfd: cs42l43: Tidy up header includes Date: Wed, 24 Jan 2024 15:12:17 +0000 Message-ID: <20240124151222.1448570-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: AozGL7WfIKeRKsB6yIVyXAejrXDCfbYL X-Proofpoint-GUID: AozGL7WfIKeRKsB6yIVyXAejrXDCfbYL X-Proofpoint-Spam-Reason: safe Message-ID-Hash: KRXFFTAQNY2LWKNF4ZTY2KLCAHIS5TOY X-Message-ID-Hash: KRXFFTAQNY2LWKNF4ZTY2KLCAHIS5TOY X-MailFrom: prvs=8753590469=ckeepax@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use more forward declarations, move header guards to cover other includes, and rely less on including headers through other headers. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- drivers/mfd/cs42l43-i2c.c | 6 +++++- drivers/mfd/cs42l43-sdw.c | 6 +++++- drivers/mfd/cs42l43.c | 8 +++++++- drivers/mfd/cs42l43.h | 9 +++++---- include/linux/mfd/cs42l43.h | 13 +++++++------ 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/drivers/mfd/cs42l43-i2c.c b/drivers/mfd/cs42l43-i2c.c index 4922211680c96..7162274a0b551 100644 --- a/drivers/mfd/cs42l43-i2c.c +++ b/drivers/mfd/cs42l43-i2c.c @@ -6,11 +6,15 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include #include -#include #include +#include #include +#include #include +#include +#include #include "cs42l43.h" diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c index 1d85bbf8cdd5d..d6962a5a35f65 100644 --- a/drivers/mfd/cs42l43-sdw.c +++ b/drivers/mfd/cs42l43-sdw.c @@ -6,11 +6,15 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include #include #include -#include +#include #include +#include #include +#include +#include #include #include #include diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c index 7b6d07cbe6fc6..4e2bc5ad244a5 100644 --- a/drivers/mfd/cs42l43.c +++ b/drivers/mfd/cs42l43.c @@ -6,18 +6,24 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include #include #include #include +#include #include -#include #include +#include #include #include +#include #include #include +#include #include +#include #include +#include #include "cs42l43.h" diff --git a/drivers/mfd/cs42l43.h b/drivers/mfd/cs42l43.h index eb4caf3938332..70129db9f916e 100644 --- a/drivers/mfd/cs42l43.h +++ b/drivers/mfd/cs42l43.h @@ -6,15 +6,16 @@ * Cirrus Logic International Semiconductor Ltd. */ -#include -#include -#include - #ifndef CS42L43_CORE_INT_H #define CS42L43_CORE_INT_H #define CS42L43_N_DEFAULTS 176 +struct cs42l43; +struct dev_pm_ops; +struct device; +struct reg_default; + extern const struct dev_pm_ops cs42l43_pm_ops; extern const struct reg_default cs42l43_reg_default[CS42L43_N_DEFAULTS]; diff --git a/include/linux/mfd/cs42l43.h b/include/linux/mfd/cs42l43.h index cf8263aab41bd..2239d8585e785 100644 --- a/include/linux/mfd/cs42l43.h +++ b/include/linux/mfd/cs42l43.h @@ -6,20 +6,21 @@ * Cirrus Logic International Semiconductor Ltd. */ +#ifndef CS42L43_CORE_EXT_H +#define CS42L43_CORE_EXT_H + #include -#include -#include #include #include #include -#include #include -#ifndef CS42L43_CORE_EXT_H -#define CS42L43_CORE_EXT_H - #define CS42L43_N_SUPPLIES 3 +struct device; +struct gpio_desc; +struct sdw_slave; + enum cs42l43_irq_numbers { CS42L43_PLL_LOST_LOCK, CS42L43_PLL_READY, From patchwork Wed Jan 24 15:12:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 765649 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E322DC46CD2 for ; Wed, 24 Jan 2024 15:14:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 32A92844; Wed, 24 Jan 2024 16:14:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32A92844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706109270; bh=ATN4BkgH0lZOB8gE/0EB0dUVYI+ZIu03Xpg1E9oDN64=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dxcm2rkBRzxIPL+0rSJ78fOt3h/BfFKkGhUGTf2TzioFOXY8QzFrda2/r8fdmG3kx qt//SiLzeBK44KNkcyy7fVpRP6xaeYv1adeAN5LR82oFvQ+XsasN7OWOFnSQHSqZf/ 4usKc1b1MfgDPlanCDe1du93nAef/wUoNWWs36po= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3229DF80659; Wed, 24 Jan 2024 16:13:00 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BE8FEF80637; Wed, 24 Jan 2024 16:12:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1938CF80589; Wed, 24 Jan 2024 16:12:49 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9D266F802BE for ; Wed, 24 Jan 2024 16:12:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9D266F802BE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=orjibm9X Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O7L4cx000450; Wed, 24 Jan 2024 09:12:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=AwR6C1+x9dj3mRA8FTLGca+Bnav8YT0q1yASPkfi4B4=; b= orjibm9X5zCK/LUY41SQhw4sg1ora4sqoreJnMqIfld/Fspf7+jqKYAAC9mTMzWi C3xSmnCQspJ8JR1g8nATJ+323ouaqueiXGTt+IPpDT6bBao1UoLgJEB+wocyWUt1 p3/mU0u/B6w6jQzK2kYAD2bRkLRYnJiuQ9ZTcqC9WuPi6cBAQ3tL1yfOikP/dQYf 3mHng2P963xgcXSJtrKgk93vlOMS/TecmgK+j9uB6Iiw6DG4idmufB7bJ99kdJlZ Az2hN6osI6nIbrBbjSJGaw36ZTHL2HijPylJ9oMMrW2QqD9i7KGiaKib5BcMRju7 7Nri7YuJrRJ1EUzfwaWQEw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmfhgxx7-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:12:27 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 24 Jan 2024 15:12:22 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.40 via Frontend Transport; Wed, 24 Jan 2024 15:12:22 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 47882820249; Wed, 24 Jan 2024 15:12:22 +0000 (UTC) From: Charles Keepax To: , CC: , , , Subject: [PATCH 4/6] mfd: cs42l43: Add some missing dev_err_probes Date: Wed, 24 Jan 2024 15:12:20 +0000 Message-ID: <20240124151222.1448570-4-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124151222.1448570-1-ckeepax@opensource.cirrus.com> References: <20240124151222.1448570-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: N7EMzrEFe-zMAcG550JDnS65412RnVn2 X-Proofpoint-GUID: N7EMzrEFe-zMAcG550JDnS65412RnVn2 X-Proofpoint-Spam-Reason: safe Message-ID-Hash: FUKKHGGVIDNHLSQ57GPEKOAQ4SSXAQMS X-Message-ID-Hash: FUKKHGGVIDNHLSQ57GPEKOAQ4SSXAQMS X-MailFrom: prvs=8753590469=ckeepax@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use of dev_err_probe was missed in the i2c and sdw parts of the code, update the missing parts. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- drivers/mfd/cs42l43-i2c.c | 9 +++------ drivers/mfd/cs42l43-sdw.c | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/cs42l43-i2c.c b/drivers/mfd/cs42l43-i2c.c index 7162274a0b551..c9e4ea76149a8 100644 --- a/drivers/mfd/cs42l43-i2c.c +++ b/drivers/mfd/cs42l43-i2c.c @@ -38,7 +38,6 @@ static const struct regmap_config cs42l43_i2c_regmap = { static int cs42l43_i2c_probe(struct i2c_client *i2c) { struct cs42l43 *cs42l43; - int ret; cs42l43 = devm_kzalloc(&i2c->dev, sizeof(*cs42l43), GFP_KERNEL); if (!cs42l43) @@ -50,11 +49,9 @@ static int cs42l43_i2c_probe(struct i2c_client *i2c) cs42l43->attached = true; cs42l43->regmap = devm_regmap_init_i2c(i2c, &cs42l43_i2c_regmap); - if (IS_ERR(cs42l43->regmap)) { - ret = PTR_ERR(cs42l43->regmap); - dev_err(cs42l43->dev, "Failed to allocate regmap: %d\n", ret); - return ret; - } + if (IS_ERR(cs42l43->regmap)) + return dev_err_probe(cs42l43->dev, PTR_ERR(cs42l43->regmap), + "Failed to allocate regmap\n"); return cs42l43_dev_probe(cs42l43); } diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c index d6962a5a35f65..65f7b1d782486 100644 --- a/drivers/mfd/cs42l43-sdw.c +++ b/drivers/mfd/cs42l43-sdw.c @@ -171,7 +171,6 @@ static int cs42l43_sdw_probe(struct sdw_slave *sdw, const struct sdw_device_id * { struct cs42l43 *cs42l43; struct device *dev = &sdw->dev; - int ret; cs42l43 = devm_kzalloc(dev, sizeof(*cs42l43), GFP_KERNEL); if (!cs42l43) @@ -181,11 +180,9 @@ static int cs42l43_sdw_probe(struct sdw_slave *sdw, const struct sdw_device_id * cs42l43->sdw = sdw; cs42l43->regmap = devm_regmap_init_sdw(sdw, &cs42l43_sdw_regmap); - if (IS_ERR(cs42l43->regmap)) { - ret = PTR_ERR(cs42l43->regmap); - dev_err(cs42l43->dev, "Failed to allocate regmap: %d\n", ret); - return ret; - } + if (IS_ERR(cs42l43->regmap)) + return dev_err_probe(cs42l43->dev, PTR_ERR(cs42l43->regmap), + "Failed to allocate regmap\n"); return cs42l43_dev_probe(cs42l43); } From patchwork Wed Jan 24 15:12:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 765650 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00300C46CD2 for ; Wed, 24 Jan 2024 15:13:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2FD0BB70; Wed, 24 Jan 2024 16:13:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2FD0BB70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706109234; bh=8fSzUVey984nMEt+aAXA7c16HLFwu6d7XSq7GXLETks=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Y8GqFIT8Q7jymOLhlCEh6Qy69QhtIjupmyKfJnPjgrJ4fci36VxjkAFEMQXr9cea0 fjinETJiT+W7KuO0S6YNiwVh2DBjOzOR/oQw5y3Se1S4liAJiMMBJBJnDAcuW2mgkZ XnS86AsF/QA/x4WgDfaNDNJ/Lf0BDnhPnVOxLxAI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86D83F805F6; Wed, 24 Jan 2024 16:12:53 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 49A27F805F4; Wed, 24 Jan 2024 16:12:53 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CC706F802E8; Wed, 24 Jan 2024 16:12:42 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A9BC8F8028D for ; Wed, 24 Jan 2024 16:12:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A9BC8F8028D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=fZLq6Zj0 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O8PstE007460; Wed, 24 Jan 2024 09:12:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=xqockhO3PC0w8zteR8DQgwdzsYaq2lS11Dt4dduvSI4=; b= fZLq6Zj0KpSFrjCQCa7XA5r9C+aAkPNzuD7IZSYXYlTPws6C3OoL0nhQQC2VeQjD cexHOq8T4TC0UKMjpGUZDg8ULpSuflfQBnUkkBHLmGiInIlskMDp8WNeCDBD9fvy MER/ZAxr34t+ggBDFfbMhO4+jfkvry5upd7t/pWpmCYUG08UT7/sCg02KmC8gvox bo2cjZOhJXmdmalwafvlA2RmZwP2gmVOBvCqjixlvFzZKb72FmUJlQpu5etxy/vS 6AkNejLlwKHcjhXt4EaASd3J9jxmzjjZSwC68x7s3dq87ORy/ZrpGbmKC/RjWQy9 BJn40LEbvo5PdgF2SWgrXA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmfhgxx8-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:12:25 -0600 (CST) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 24 Jan 2024 15:12:22 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40 via Frontend Transport; Wed, 24 Jan 2024 15:12:22 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 5386882024A; Wed, 24 Jan 2024 15:12:22 +0000 (UTC) From: Charles Keepax To: , CC: , , , Subject: [PATCH 5/6] mfd: cs42l43: Handle error from devm_pm_runtime_enable Date: Wed, 24 Jan 2024 15:12:21 +0000 Message-ID: <20240124151222.1448570-5-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124151222.1448570-1-ckeepax@opensource.cirrus.com> References: <20240124151222.1448570-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ht3Mncp21og942O5GIgF56txXAIWH9sr X-Proofpoint-GUID: ht3Mncp21og942O5GIgF56txXAIWH9sr X-Proofpoint-Spam-Reason: safe Message-ID-Hash: JBOSZFZBGTFON5MEAYD4FR6JLHNTTL6W X-Message-ID-Hash: JBOSZFZBGTFON5MEAYD4FR6JLHNTTL6W X-MailFrom: prvs=8753590469=ckeepax@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: As it devm_pm_runtime_enable can fail due to memory allocations, it is best to handle the error. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- drivers/mfd/cs42l43.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c index aea0f8f485785..56bd9dbbe10b0 100644 --- a/drivers/mfd/cs42l43.c +++ b/drivers/mfd/cs42l43.c @@ -1065,7 +1065,9 @@ int cs42l43_dev_probe(struct cs42l43 *cs42l43) * the boot work runs. */ pm_runtime_get_noresume(cs42l43->dev); - devm_pm_runtime_enable(cs42l43->dev); + ret = devm_pm_runtime_enable(cs42l43->dev); + if (ret) + return ret; queue_work(system_long_wq, &cs42l43->boot_work);