From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B35B9C433EF for ; Thu, 17 Feb 2022 20:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:To:Cc:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AOfgfwze0SMK16Ge6everCBTTDp3URJOemm+6VrYgFw=; b=DvTxAlhavO2RL/ m575+AqJaSWFq0lzWA2lOEEzMASBfGafc1gjAuQNOIIIZiPZfdV687dqE3lQJ4Hjb4Kb+ojrqOlA7 yME7X0xovduF+qKRY+pTx7MKsc9sbao+iwaFlitL2VwFzoFejGzsKW1XL7bRuBGJBYTy+4ZrcZnH6 GE4v4+7yO3udlnrCDez/tjp4mS9zC68g4/zLhK7BY8utouskt9bmZ/H76u9uuHx87yYaBxe4RgfEV fA/hTnt209cVPuL73YP6T1x9SVPJsxkkc+pqbA9B5iaTy1D02L/KiGLvQ7xmY7dNAtswH6agYiI25 i0TlntWVB1f+9tIMAkag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKnUT-00C8Yb-4E; Thu, 17 Feb 2022 20:35:01 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKnMx-00C4pR-Tr; Thu, 17 Feb 2022 20:27:17 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 448DC61E07; Thu, 17 Feb 2022 20:27:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04E2FC340E8; Thu, 17 Feb 2022 20:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645129635; bh=sNfEL4qPz/YKpoz2FZqa2kn8NIWSr9QYg5aiwDlvBKc=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=TwBl7NEis6eav2W8qiuHVYtTBZGKSzVd9LjWIqh4nNPH8SKvLk3ol/kHX6/ITqm43 /itljxvAwhPpntr545JR4uFu5aMSxHvdF/OfbDWkn1M+Qz8ByFeH8kMelHLnPLF0gb FldZ3rw1PmDBwvDDQMlR9hq6WOAY1rQsOKuVVjn7CoEV6GhuCizIiRs5fQFB2YOnVD 5Onr9jS0f2fbZeGrIsFNKxhE5VUZyiMrOtYynN3h/n353eYXWLZN7P5O/W2V5qI22b uiiV53A5ApCJeDYt00bD9vZY7kdTeVAWn0YwA+PSa12LBgrVkrTK1V+9wM0gqpruFy u2YiC1od3CIUQ== MIME-Version: 1.0 In-Reply-To: <20220208124034.414635-23-wenst@chromium.org> References: <20220208124034.414635-1-wenst@chromium.org> <20220208124034.414635-23-wenst@chromium.org> Subject: Re: [PATCH v3 22/31] clk: mediatek: gate: Implement error handling in register API From: Stephen Boyd Cc: Chen-Yu Tsai , Chun-Jie Chen , AngeloGioacchino Del Regno , Miles Chen , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org To: Chen-Yu Tsai , Matthias Brugger , Michael Turquette Date: Thu, 17 Feb 2022 12:27:13 -0800 User-Agent: alot/0.10 Message-Id: <20220217202715.04E2FC340E8@smtp.kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_122716_073017_9C4EE17E X-CRM114-Status: GOOD ( 10.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Chen-Yu Tsai (2022-02-08 04:40:25) > The gate clk type registration function does not stop or return errors > if any clk failed to be registered, nor does it implement an error > handling path. This may result in a partially working device if any > step failed. > > Make the register function return proper error codes, and bail out if > errors occur. Proper cleanup, i.e. unregister any clks that were > successfully registered, is done in the new error path. > > Signed-off-by: Chen-Yu Tsai > Reviewed-by: Miles Chen > Reviewed-by: AngeloGioacchino Del Regno > --- Applied to clk-next _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel