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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B73B1C433F5 for ; Thu, 17 Feb 2022 20:28:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343643AbiBQU2e (ORCPT ); Thu, 17 Feb 2022 15:28:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbiBQU2b (ORCPT ); Thu, 17 Feb 2022 15:28:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D58AC2E77; Thu, 17 Feb 2022 12:28:17 -0800 (PST) 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 EE98761E0C; Thu, 17 Feb 2022 20:28:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50A77C340E8; Thu, 17 Feb 2022 20:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645129696; bh=YP6Tpg4F9lAg6AlLYRmupY/d97PX8JL8bzj+VrF5RCo=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=kYFlFRp2C1yDjZ4L6kFMYHY1kqIhrcSwxyoge3tS4O2vbSzzMS3PyJMmf2YUxXFRU uh35TcjTvhlsO0s1ih2H1E9GzFYv2i9oiYI2XoMUDNBmYkNpleWeXhFjL/E46wXU7s z2+xCrBSeSAWOaN37S5eUTBymgHXpM3tIuYNP63K2S6Yq5kT1PJzr6JPh9mJmm50Sa CLeunKxJpf71ZEt2AHJMWFVz7+siIKXD57a6XvG/zUrve/UqhgxkkQGKXP5ihFkdyC obMieA6Z/mfhwYC/JHU6RINTq1tkYde3yHBkBIuW86QTc5p248xefqJIbXv6xPtd6d IsTsdID0ntnrQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220208124034.414635-27-wenst@chromium.org> References: <20220208124034.414635-1-wenst@chromium.org> <20220208124034.414635-27-wenst@chromium.org> Subject: Re: [PATCH v3 26/31] clk: mediatek: mtk: Implement error handling in register APIs 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:28:14 -0800 User-Agent: alot/0.10 Message-Id: <20220217202816.50A77C340E8@smtp.kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Chen-Yu Tsai (2022-02-08 04:40:29) > The remaining clk registration functions do not stop or return errors > if any clk failed to be registered, nor do they implement error > handling paths. This may result in a partially working device if any > step fails. >=20 > Make the register functions 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. >=20 > This also makes the |struct clk_data *| argument mandatory, as it is > used to track the list of clks registered. >=20 > Signed-off-by: Chen-Yu Tsai > Reviewed-by: Miles Chen > Reviewed-by: AngeloGioacchino Del Regno > --- Applied to clk-next