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 E6099C433EF for ; Thu, 17 Feb 2022 20:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343637AbiBQU2Z (ORCPT ); Thu, 17 Feb 2022 15:28:25 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343630AbiBQU2W (ORCPT ); Thu, 17 Feb 2022 15:28:22 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2F9FC330E; Thu, 17 Feb 2022 12:28:07 -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 ams.source.kernel.org (Postfix) with ESMTPS id 2ABD0B824A5; Thu, 17 Feb 2022 20:28:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7D4EC340E8; Thu, 17 Feb 2022 20:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645129684; bh=eaPZj3u0FRK7Q5xe6awF/0VzEPeL8/ugi55otvqTHTw=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=O0jDXx7YVJttwC8GYqtbmzpaQxjhnGcqmSgoBaQkIPk39T/GgSLXZ6e8BSdrYkzwD u253SKb8Psxb1JEAhsWOg5Z+8k9BLPgX27dU4blshKjXBJhRVbEXniRWsTD6XM9Og3 Fm5S+/JtV9k32RY696hMC90wH6f0jYJFqPKbZr6CNHrWoXi3Emr6DZkjGYIJEys6vW 7olIOnG7fjh00YVIGgdqc+0waGDYyvNO5c3VwpjRNKuzvtqisa6Eg/cN+SPrQnH2BL +An0lRgc9+46LP2N9ZqJNIt82JP0g8/oi4Ip6U/0Qc+6JdZwPXm7nsLg/vqAMJ+sQx SxhGOtbqIr3nA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220208124034.414635-26-wenst@chromium.org> References: <20220208124034.414635-1-wenst@chromium.org> <20220208124034.414635-26-wenst@chromium.org> Subject: Re: [PATCH v3 25/31] clk: mediatek: pll: 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:28:03 -0800 User-Agent: alot/0.10 Message-Id: <20220217202804.A7D4EC340E8@smtp.kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Chen-Yu Tsai (2022-02-08 04:40:28) > The pll 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. >=20 > 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, and unmap the I/O space, is done in the new > error path. >=20 > Signed-off-by: Chen-Yu Tsai > Reviewed-by: Miles Chen > Reviewed-by: AngeloGioacchino Del Regno > --- Applied to clk-next