From patchwork Thu Sep 14 20:31:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 139966 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp741419vqi; Thu, 14 Sep 2023 18:44:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENqbGRag+45Ivp4oAFlv7qqVva8G+IiTgOi5MjCVRJ3S/5E3S9Nq6xeupL4/fdSnu6Rbg5 X-Received: by 2002:a05:620a:2589:b0:767:82e8:eb88 with SMTP id x9-20020a05620a258900b0076782e8eb88mr244821qko.7.1694742277182; Thu, 14 Sep 2023 18:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694742277; cv=none; d=google.com; s=arc-20160816; b=bGeJfaSmEV7TGoZyPDRNQEQTsvDi5BkqWWVrB6GfTizPOtyWK88eUiWZzm06a8eVsF cx8qkO/BQaU1WXAqLZF+FpFnDcKtaOlBqsKaVxKWSUlu0p6nc33xq+9wkS2JeF8dRfbY +v4+XFixCXRPLBG4EUFn0+4PiJY5YDcY5KL//LZwr6B/8Q3q5HTQdfzA82LHkWy/ZwrN U6eQkH7xtHT7Hvx8fTDyuPljNHvlDKsOFAIKVshjCYz5cvJiBVV1pjXR7Bsnc7sl+Rac G4scAd2RYOIKbHdLY4kF1XpzDYWM2DmopdM+BBRPz9mK76aBYGfXap+ENOa2KmQFzM/k XuMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vDMwGPoL7IUwKLZSj66ABJwQcRH7iJ6OhehhdBpzoGI=; fh=uRtjX4tW/2u6hJ6MjD3hufbLT/8nXPchx+f+WmII/I4=; b=g2xZPsQYYOxLO3v+u8LR58hvc//1cm7i/PsGYK3Bg5+N1y/PBGepfj7D918NLxdSWB 6MAadDlD4dryu/Mx8o824bGiACBtVV9j0105isl46JlKcMv8nMJ8pBGR9vJi5VUFTK20 Uszn4J6MSjLzpOdPAEvPGYKvG9G4tctuOWPDsnnO9CZZ6LjR2JoLoGbjlKwkjzl1q8oc NYrP9xwuh8Z1dHLtlcydaNsH1oaeRHZh3DmjG2CFowuQE6P8INTXYIRH53YIeMD5bHCC tJYrrT63qqFSh+YhqfsNyyPhBioWtx6IVZ0IxWWVdS51YArFNGKId7XxrYH8NC05lJAD F7YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=H53P1VIq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x5-20020a654145000000b00564a1716ebbsi2286644pgp.697.2023.09.14.18.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 18:44:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=H53P1VIq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 28B10819FC48; Thu, 14 Sep 2023 13:31:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbjINUb0 (ORCPT + 33 others); Thu, 14 Sep 2023 16:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbjINUbY (ORCPT ); Thu, 14 Sep 2023 16:31:24 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19ABF2704 for ; Thu, 14 Sep 2023 13:31:20 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id gszUqMvFz7mcCgszeqSuie; Thu, 14 Sep 2023 22:31:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1694723478; bh=vDMwGPoL7IUwKLZSj66ABJwQcRH7iJ6OhehhdBpzoGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=H53P1VIqYoTjl1GsFVQAtp1OUqAcTgfxyzCQIi7cOILeyUZmPhDyWJhgyBfbLcBp1 Ytg/siSE+/4EFWOce4lK2PyDFezrBpi2Y403yLVvLp1XBhT+9W2cr+jitk4DWtiqml Ww737IvD6ByWQupws/gWtCOkh4TqrHIWKsP+0Yp0qBJHd624z/ESKvMjFwkE29XY6i IIEO6CUPSk2FdJXq0YBaIWrD6i2/Z9VlX7nqZo8qrrR6ojDVItnZ7K2DAR//iSheYo MY7ePLJMSK5fxMknV83WAokoDP6yHtaUeQAp58i3pkBi3talLLPHzitWCMYxN3G23u esTHVNSH3ybLw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 14 Sep 2023 22:31:18 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: abelvesa@kernel.org, peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, shengjiu.wang@nxp.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 1/5] clk: imx: imx8: Fix an error handling path in clk_imx_acm_attach_pm_domains() Date: Thu, 14 Sep 2023 22:31:02 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 13:31:26 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777066078092616408 X-GMAIL-MSGID: 1777066078092616408 If a dev_pm_domain_attach_by_id() call fails, previously allocated resources need to be released. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Reviewed-by: Peng Fan Signed-off-by: Christophe JAILLET --- drivers/clk/imx/clk-imx8-acm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 1e82f72b75c6..87025a6772d0 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -279,8 +279,10 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev, for (i = 0; i < dev_pm->num_domains; i++) { dev_pm->pd_dev[i] = dev_pm_domain_attach_by_id(dev, i); - if (IS_ERR(dev_pm->pd_dev[i])) - return PTR_ERR(dev_pm->pd_dev[i]); + if (IS_ERR(dev_pm->pd_dev[i])) { + ret = PTR_ERR(dev_pm->pd_dev[i]); + goto detach_pm; + } dev_pm->pd_dev_link[i] = device_link_add(dev, dev_pm->pd_dev[i], From patchwork Thu Sep 14 20:31:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 139830 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp614822vqi; Thu, 14 Sep 2023 13:44:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+uwq1tCnxNie6RIDfdCEOFyf4RnN/hDpMKVsGA7ofwsclTqXU5YrNx/rNArPh1AoKYJKI X-Received: by 2002:a17:903:1245:b0:1bb:9506:d47c with SMTP id u5-20020a170903124500b001bb9506d47cmr8836307plh.19.1694724249468; Thu, 14 Sep 2023 13:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694724249; cv=none; d=google.com; s=arc-20160816; b=C5nMz4Uy08nQF4Oou+odqs1kVHomi+2ESZpwsIdOg/q9LU72v3yFNOJtcohnNQElDC wjgaJuQcTbjstOIEAT8igvm4m7mkHqVLWfv04mbZrFlueqdDH60pZdl98xPZ+IyKGtgb yRg2ccRe3x6gY6pwcpiiK14HJDMUXgbQ9t/fZ3LWzDn1xu8d51zbuF/UUkX0QQdZLS/H rEwg5CgZLb9KVgUvECm37rRPmqLBib26JyLhfIB4BWyg/Otjhzb+wMguPh+kdFtreYLM UwDLdrf+nTW5S1VvQRop35I7b64tExJX5BQGbg0/kSmx1ERe870fQDpJE2PqmfnfeACZ 6/Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L4zSBrHMeKtx3k1Cx39Zzdjpsyw54yrC3izyk+zGNhc=; fh=uRtjX4tW/2u6hJ6MjD3hufbLT/8nXPchx+f+WmII/I4=; b=nasyaHNqQrXxu1xgqU3aOFu6cQlwB4CT6VtNGInPuhgmrSv2ymjJGO04VpwkvQyRTd ZIEaovmblJw/fV5WGs696wkQvI25mdNbp2hqHec+2WlXkFhJbty+2ZQRbkgk1k553bE6 qLestSiCa4o3a355YIUgFgIKgApqYwAQp73dmLk90HiTwJICK0a10H98Y3u4vVtCZbmd VU6h5hqDKSHxBKOgkRr3e0dSePq+1bYDUHO/UNs5CZ+mpEp8f8b7qCbsr5OTF9wlNblY qPn6juvDd373+C22SbHJDpaYEE2yFnZmKirf70cisxjyKXYi4jigkERutFrjIWmFGoyw gHZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=ATMsMx1X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id i13-20020a17090332cd00b001c38666f77dsi2372984plr.596.2023.09.14.13.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=ATMsMx1X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D3F3C830339E; Thu, 14 Sep 2023 13:31:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbjINUb0 (ORCPT + 33 others); Thu, 14 Sep 2023 16:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjINUbZ (ORCPT ); Thu, 14 Sep 2023 16:31:25 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E424826B2 for ; Thu, 14 Sep 2023 13:31:20 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id gszUqMvFz7mcCgszfqSuj1; Thu, 14 Sep 2023 22:31:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1694723479; bh=L4zSBrHMeKtx3k1Cx39Zzdjpsyw54yrC3izyk+zGNhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ATMsMx1XQDh6q4gSJOcwj9KwlnjMBXuJlakUA/vN5iamikjxfr3xTo6ydf3fRJziS yoLAArLg1MaN/b1fxKjOcQiqUZkiIS+YFmLvyuUdb64nqTHQCdc1C1y+9eNyp2KLGp lBiTbaqeoVdBLDz+2XSPipXUEOqwqY/np5ZNKNkcN+y3VXRGEXV3HRsh77h5mbyF9l 8BDO2h7Z8zlrWgAcTSmwg8ZCdhAr+ynFGBmQeNl25k1Kj0qwTmxvSa4lShV1GQdsie QzkPy0R/cGrdHEnneHSjMDE8F8PdI0csvi9bh+4igPUmIuz1ubFruRx9Co/EkTptiD cty6ejsRJQcSg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 14 Sep 2023 22:31:19 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: abelvesa@kernel.org, peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, shengjiu.wang@nxp.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 2/5] clk: imx: imx8: Fix an error handling path if devm_clk_hw_register_mux_parent_data_table() fails Date: Thu, 14 Sep 2023 22:31:03 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Sep 2023 13:31:33 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777047174404133564 X-GMAIL-MSGID: 1777047174404133564 If a devm_clk_hw_register_mux_parent_data_table() call fails, it is likely that the probe should fail with an error code. Set 'ret' before leaving the function. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Reviewed-by: Peng Fan Signed-off-by: Christophe JAILLET --- drivers/clk/imx/clk-imx8-acm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 87025a6772d0..73b3b5354951 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -373,6 +373,7 @@ static int imx8_acm_clk_probe(struct platform_device *pdev) sels[i].shift, sels[i].width, 0, NULL, NULL); if (IS_ERR(hws[sels[i].clkid])) { + ret = PTR_ERR(hws[sels[i].clkid]); pm_runtime_disable(&pdev->dev); goto err_clk_register; } From patchwork Thu Sep 14 20:31:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 140713 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1336294vqi; Fri, 15 Sep 2023 14:44:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrqolkA7jNmE2afd6B6NKw3CMprN4jB7C/ICa2rRs3ZXay/69yXeIRfhF90AW+42pGkdhu X-Received: by 2002:a05:6358:430c:b0:129:d242:f782 with SMTP id r12-20020a056358430c00b00129d242f782mr3710126rwc.0.1694814259746; Fri, 15 Sep 2023 14:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694814259; cv=none; d=google.com; s=arc-20160816; b=ouw1Q2yfAAs2qSQP1QwOep/ivQjIAFjEFtp9F9phE0r3+1vOKOZq9sPH8a9k/fLV8N ghunEVPcnTRNi35WZSJE23B7GcFAU+xOHG0uHhqJDEwu93Gg/M2xyh3Ga8lpb8Z2vcCv VYf3piVQ+zbItegJ7bp6cRE1Jy83DHAGfZ2uJgKpsR9ZED27U7hfDeIHLU1dNhCa+/H9 6U2wxIEXuWafGSzWfVyjjFCDvtGOJNtyecm+EQpGGXoZAIv716juiQoHvg7yWZ4n4seR jZ2wGT8VYOYWlx8YG2+7w9L6KZifU1jiH3sPylsmnAFmZ0Z+ipzylmcg+ee4LgXQogcp FurA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uJUbD44KFFzWixdbKCNvbFqaLxCfMEIUABC+xCGz+h8=; fh=uRtjX4tW/2u6hJ6MjD3hufbLT/8nXPchx+f+WmII/I4=; b=IN1jy2+VGZKXzlxeYffVYNbkQFzwK7602oizW53YTIy0c38PiWVoTNTNBCW/G0sbTc ya4Egctdti2yTBcUiwpPbHUjM0iELUM5L4kgGPmwdlZLfGsP8PP8N/GBLNMBhUfTuJnt 7Hi5rssW3wL3ClN13DB7zQCuI/9YOElNKfl+x7cFDzAO52MZWjUwx1Op2YGBui1l+qL1 blrqM3conKagi/y+4d+Z/x+HCY1fvP7CIn4L5Fyj7fNrkTcifiXyUiImUbqcwKjShLhf dtR1SjZLm0BPcGjLFmd6codV+kgUXM338MDQkbYnuvS933My+cHZhbC8piHA13b9611U 5ItQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="YsX/EaRd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w62-20020a638241000000b00577812dd270si3746862pgd.573.2023.09.15.14.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 14:44:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="YsX/EaRd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id ACC068258C88; Thu, 14 Sep 2023 13:31:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjINUb2 (ORCPT + 33 others); Thu, 14 Sep 2023 16:31:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjINUb0 (ORCPT ); Thu, 14 Sep 2023 16:31:26 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B123F2701 for ; Thu, 14 Sep 2023 13:31:21 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id gszUqMvFz7mcCgszgqSujL; Thu, 14 Sep 2023 22:31:20 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1694723480; bh=uJUbD44KFFzWixdbKCNvbFqaLxCfMEIUABC+xCGz+h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YsX/EaRdLBP85K/6bBP2Aha5OcT3dD8fBN9dwo5VUfI+WskzbbHIhG5SdMV5qrLxq 4mynLaS+CwsO9EC4d2UpwkhaWR+aSXd8iH82HeTiD7GMUb5dIPEtzH4TG4qH4/WgTS LcxbGiDsJiMBiskch95I5TdB1H4uEt4+4NBzSy5kGnLDVu/PEgMtiucXDDUubaQa8k fEQJuagJOCtIHSY48dsi2OF8nqMQhlwAgteuiscn8tqM9CS//lYwicdnkc7pwd0J2z 74tonesYF6Z4mKsSv5+8Zl/MqUDRqDMEFp7MhZdgggnYj2lrClchrqNo0wMtvIYuOz P88jgwDJCB4/A== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 14 Sep 2023 22:31:20 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: abelvesa@kernel.org, peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, shengjiu.wang@nxp.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 3/5] clk: imx: imx8: Fix an error handling path in imx8_acm_clk_probe() Date: Thu, 14 Sep 2023 22:31:04 +0200 Message-Id: <64da5952f807f37f29f0c4420ac1bde416551a13.1694722339.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 13:31:34 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777141557083449702 X-GMAIL-MSGID: 1777141557083449702 If an error occurs after a successful clk_imx_acm_attach_pm_domains() call, it must be undone. Add an explicit error handling path, re-order the code and add the missing clk_imx_acm_detach_pm_domains() call. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Reviewed-by: Peng Fan Signed-off-by: Christophe JAILLET --- drivers/clk/imx/clk-imx8-acm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 73b3b5354951..1c95ae905eec 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -374,7 +374,6 @@ static int imx8_acm_clk_probe(struct platform_device *pdev) 0, NULL, NULL); if (IS_ERR(hws[sels[i].clkid])) { ret = PTR_ERR(hws[sels[i].clkid]); - pm_runtime_disable(&pdev->dev); goto err_clk_register; } } @@ -384,12 +383,16 @@ static int imx8_acm_clk_probe(struct platform_device *pdev) ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_hw_data); if (ret < 0) { dev_err(dev, "failed to register hws for ACM\n"); - pm_runtime_disable(&pdev->dev); + goto err_clk_register; } -err_clk_register: + pm_runtime_put_sync(&pdev->dev); + return 0; +err_clk_register: pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + clk_imx_acm_detach_pm_domains(&pdev->dev, &priv->dev_pm); return ret; } From patchwork Thu Sep 14 20:31:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 140142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp809948vqi; Thu, 14 Sep 2023 22:02:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEt6TB4lj2EghbbXa6xxfIkAh36RM9sL8ZeR6mXdfrgX7Fi5nBxVK+vtQcgno3d2ra/ZXpQ X-Received: by 2002:a05:6a20:5488:b0:14d:16c:2d20 with SMTP id i8-20020a056a20548800b0014d016c2d20mr950839pzk.44.1694754131429; Thu, 14 Sep 2023 22:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694754131; cv=none; d=google.com; s=arc-20160816; b=YxcHEMBee5kgMdwFYN4NU+hpcxn4rABQN8QThyP6Gcpc7sh8RNgAUbffdu1K5FT+Um 44rF3PRGc1nTPchaV/DT7fsqXgc194JjnpCiAlX6sxsG8eeMUkHhpc4xifRBQwu5UFA4 hSHESrEDmcsRN4tu/qdf6P0qRGIVJBHszTRPyzax3UB99HS43UDO7j+jCWQUnAYHLMME bJaRrY3UXpGVR/DSFd5+C2GfvLknNZJq2biGNrGEOyFfCiQIPFqin4DL+NvcA+NRqA9t EfyG0SGfl0w/kG8g38ZHhiQIZSz5tJRZGgH0N6DwjshPVysod1LuA8EOeocvNJJb3sUu 3zcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NmPmvwDti8A6+vjVsHfI78i7GC2N7ByVUqJXUWyMtrc=; fh=uRtjX4tW/2u6hJ6MjD3hufbLT/8nXPchx+f+WmII/I4=; b=kd/GEZYag6Fd7yhWL39Pij/yJMw1OOyDlqHj1gCR6ervViEQvr8D1l+byChfQReoQZ yw7YH3HIllFaOhon+RJNtevhFQ/0l0+QPmN7lfZiuL01c90GfrV7jy0AdiLKhyoejTYj klnXcFCOPvVnuvQly/I491lGF0agzk3DJnDuxg5C+P8S7azeq8TDfq+SDqNr73ZZ+HLU a2LApLaiaj2hOGwt2ZVszr7+OTmcUObQ5NSOliOg3awmAAGKt0W1NfD9b1964NzEpSr8 WO9CN07Yh8b3xaX/BtHSNNyURx7bSARRXX4VVg9EJlhbb+vCuLp8ZNMcYM6sydiwqKqU M4vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=KbMHK1tK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b11-20020a056a000ccb00b0068e2b1d5651si2864756pfv.281.2023.09.14.22.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 22:02:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=KbMHK1tK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A8BB18029492; Thu, 14 Sep 2023 13:31:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbjINUbc (ORCPT + 33 others); Thu, 14 Sep 2023 16:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230071AbjINUb0 (ORCPT ); Thu, 14 Sep 2023 16:31:26 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F2252696 for ; Thu, 14 Sep 2023 13:31:22 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id gszUqMvFz7mcCgszhqSujj; Thu, 14 Sep 2023 22:31:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1694723481; bh=NmPmvwDti8A6+vjVsHfI78i7GC2N7ByVUqJXUWyMtrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KbMHK1tKAqubigEX7gqvjQPN1a2Wgx4kPtqV64SP8HWfCFo3FNz5rmVOADA5MpXoU jSWY6IXMpVvezcVNjTmfUq8BU3NpOgRQHlzzB5idUFmFnn2Gr/pF2SjltqO8gl7yII 4CLNmZS0Z/PsSNECSWoWjt0M1h5ZozlUx3ohSE12jKbiClkwKzF3nWUyOwLwPbwxBG c9UdcbM7q09zmdUXZB5+fHG3ZNPhnYIxp1kCXs5f5quyimC4yERSw4HjxX2fsF0Usx eP31FbKILpkM4G5BJCvi5VuAdoCQzGhEFfxkicV7Gn4EEsOpHn5Vx9QLCiZ4NjXeIX fAZ3A5eoH30sg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 14 Sep 2023 22:31:21 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: abelvesa@kernel.org, peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, shengjiu.wang@nxp.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 4/5] clk: imx: imx8: Add a message in case of devm_clk_hw_register_mux_parent_data_table() error Date: Thu, 14 Sep 2023 22:31:05 +0200 Message-Id: <3b883db73c1ad093ea914f008db92738482734a5.1694722339.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 13:31:31 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777078507928689706 X-GMAIL-MSGID: 1777078507928689706 If devm_clk_hw_register_mux_parent_data_table() fails, we branch to the error handling path and imx_check_clk_hws() is never called. Actually, imx_check_clk_hws() is a no-op because values in 'hws' are either valid, either NULL. Move the call to imx_check_clk_hws() in the error handling path, so that an error is logged. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Reviewed-by: Peng Fan Signed-off-by: Christophe JAILLET --- drivers/clk/imx/clk-imx8-acm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 1c95ae905eec..c744fb78bb44 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -374,12 +374,11 @@ static int imx8_acm_clk_probe(struct platform_device *pdev) 0, NULL, NULL); if (IS_ERR(hws[sels[i].clkid])) { ret = PTR_ERR(hws[sels[i].clkid]); + imx_check_clk_hws(hws, IMX_ADMA_ACM_CLK_END); goto err_clk_register; } } - imx_check_clk_hws(hws, IMX_ADMA_ACM_CLK_END); - ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_hw_data); if (ret < 0) { dev_err(dev, "failed to register hws for ACM\n"); From patchwork Thu Sep 14 20:31:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 140147 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp821041vqi; Thu, 14 Sep 2023 22:30:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUlhAcTrMVbdgE8/K1xK3EDcO9RyBZSUqh25aM1LijlVLW/uUB09xD56rgQn4tHJD6pHcW X-Received: by 2002:a05:6a00:1acd:b0:68f:d35d:217e with SMTP id f13-20020a056a001acd00b0068fd35d217emr767300pfv.2.1694755845428; Thu, 14 Sep 2023 22:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694755845; cv=none; d=google.com; s=arc-20160816; b=FEaEw/Gk3IVwHzLDbUpBS+cermVAXCp94LJuBvEffg2m/AkR29fH/79c4P9HpPi+fT yHb71n5o6Z/fk3RP7EWTnAkfurYtUpuE0V+dhZuY/lR0rV4Jw8BSm/r4tmXlfnJCukkt /0sK8/w6roArjLAD1OqArp9Isn4f/YWubnHO8DC/e3XRpvyiObdbDOfYQr1AkZGhaPhW 9yz/NnYsotwLXXc6xOIT5HPtleHK4KhkAViCFQjpPJechXeyWu3/fQCzbQY6xk5DB1Gr QYiQSk4d4A8NXpVRr9TIoQ4N+ARnqZeVZMWGv3osFvPLKg4+I0vn7sjl005u3nY8Nfod YW9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c1IUka5tijpIrp0HcvGSlR2aksa59ckg6dwZ4iF3jNc=; fh=uRtjX4tW/2u6hJ6MjD3hufbLT/8nXPchx+f+WmII/I4=; b=MIHKXzWIY6bFax9YtzQn9h7ORwuTB2kYI5j0KtvMFcmMDBCem6E9kggYyXwxh9CF+Z hZ7fXqojdQJAu46vPPmK5dmsMxFXlC1q14lXbdyZo2/OU7Fl8HhZjODuWBr8anTB3Y70 OpIxopXbKb2jQREPJ7NkJO7vaJwU0ZkIGiNlsOZl06XzZrLcJV8b3joOJfCjpLUmQg4T 9TBbJ0A09u2f50nAFRQ/liU8ld+9erTiHVeS/FffWQQgQAXEBaLJfW0euQWGXfUUuh0J 3wAuRnfZf1RG/TrX/GIsqwJELmi0iwpmQfafkyp6mwvuPzzF97PCS6/tXfnqze4R/Drl zQgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=Nq8wEKbO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t18-20020a056a0021d200b0068fea05ecdasi2820073pfj.182.2023.09.14.22.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 22:30:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=Nq8wEKbO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0A61D82723A8; Thu, 14 Sep 2023 13:31:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbjINUbf (ORCPT + 33 others); Thu, 14 Sep 2023 16:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjINUb1 (ORCPT ); Thu, 14 Sep 2023 16:31:27 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A59D2704 for ; Thu, 14 Sep 2023 13:31:23 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id gszUqMvFz7mcCgszhqSuk1; Thu, 14 Sep 2023 22:31:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1694723482; bh=c1IUka5tijpIrp0HcvGSlR2aksa59ckg6dwZ4iF3jNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Nq8wEKbOwyagqkhVYlXixP+fuOOqU8zwUvxYo6II81d5G4IkN0J0t3Nf+/UaVUTfw yQh6KOw1za3vgcL8WO9nEpJUo6zZiN2jJxvdDS3kq93kfpDqj01vJEKdW7BrcxHnV6 zRKqvZsvZa0kF9c7uC9fHidpGwVFGtt3SafoXXB//Wo/kyK3EG+1y+nOJmawmnEcV9 X+7Vo/4J/l8Nm4spTLkfl1zKyKkCvG51dtOVQy+ini++O8oMm0iZ7NEX4mCoMTdBly wuLvQzI08zUcZYd+ryss/AoT7/lKvx8BgD4QSLuksdc2c2JELJgKLnoLS474/Rx72p TK4vxugtfiFpw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 14 Sep 2023 22:31:22 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: abelvesa@kernel.org, peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, shengjiu.wang@nxp.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 5/5] clk: imx: imx8: Simplify clk_imx_acm_detach_pm_domains() Date: Thu, 14 Sep 2023 22:31:06 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 13:31:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777080305104630807 X-GMAIL-MSGID: 1777080305104630807 The return value of clk_imx_acm_detach_pm_domains() is never used. Simplify the code and turn it into a void function. Reviewed-by: Peng Fan Signed-off-by: Christophe JAILLET --- drivers/clk/imx/clk-imx8-acm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index c744fb78bb44..735b08296cc8 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -310,20 +310,18 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev, * @dev: deivice pointer * @dev_pm: multi power domain for device */ -static int clk_imx_acm_detach_pm_domains(struct device *dev, - struct clk_imx_acm_pm_domains *dev_pm) +static void clk_imx_acm_detach_pm_domains(struct device *dev, + struct clk_imx_acm_pm_domains *dev_pm) { int i; if (dev_pm->num_domains <= 1) - return 0; + return; for (i = 0; i < dev_pm->num_domains; i++) { device_link_del(dev_pm->pd_dev_link[i]); dev_pm_domain_detach(dev_pm->pd_dev[i], false); } - - return 0; } static int imx8_acm_clk_probe(struct platform_device *pdev)