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 3D455C4332F for ; Thu, 17 Feb 2022 20:40:06 +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=6FEC2jrIbw30LuG+lL5Wl2rix3E5jbmsJXI9lC0GU2k=; b=k1pvR2fGNyMvK5 ERoyDYtnaOl7e6YREXjsF+sVgrTMnZKljQBmpF8PBcbLF+K8q1exs/MwKgBAhTdhOVNOaUu1dFns6 +XVcTu+j7u0SRRFYQBo4TeGE2AYJ+27RUUzal6Fy+GoMIFeWBbGxP0fkvAxCQ8MxkiiK4KCsXusAd vuCLXbP0NTd+KqZulmTiqKLDJutIDZKESU1PDhO4zIcxsbBkYNiDTgulHqrQUhRvqK2QcW0BI5pmD ygi3NJfQRC6EG8pQYl5rMMXz0G1KhIyqOhXVsX/x8S1Vd70tQSMiwD8O38lXQjLS78drVgWnv6yw1 9z924pnRr/htAMgRkpWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKnY3-00CAIm-OS; Thu, 17 Feb 2022 20:38:45 +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 1nKnNx-00C5IH-Lg; Thu, 17 Feb 2022 20:28:19 +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 EE52D61E04; 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== MIME-Version: 1.0 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_122817_862189_6E268558 X-CRM114-Status: GOOD ( 11.85 ) 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: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. > > 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. > > This also makes the |struct clk_data *| argument mandatory, as it is > used to track the list of clks registered. > > 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