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 C66EFC433F5 for ; Thu, 17 Feb 2022 20:39:13 +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=xNYNSCRWDOafjKmqeJikg/VC6JGGgb3JU1O/43TYvAY=; b=yYDzW10Kef/eiA MDddP2B/4qT3lbJBEMNlkLIFRQ0+W8TyeG8Uz3dclhdvAd1sY5dk5g/U4ttxlLWgLQOlnXqbde3Re b/8/2G+hYh6WHkHm+m1WscdgLj9Mu0u1BxFQbdOLTGYianNOqXpHe7DxfuDMWPsEc7xDEvhewnIv7 Djh8VoF36MPS7O0AReb+dBWVqwCoB236dOyrMLcja8DlhyAWttVljx1iQJqXJolkihF5Bv9u++o4d 8lpz/8KmKtKin8aZh7jJlk37GRj0eqvXvDOSAW9Yj6rAZ1b+VjcA6RtAN8qohiMMU0Ipfb5XBGp8G Ir2uVNloKiQTf80Vno5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKnX9-00C9us-ME; Thu, 17 Feb 2022 20:37:48 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKnNn-00C5DX-FO; Thu, 17 Feb 2022 20:28:08 +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 ams.source.kernel.org (Postfix) with ESMTPS id 174DAB8249E; 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== MIME-Version: 1.0 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_122807_700756_DE42D14E X-CRM114-Status: GOOD ( 10.22 ) 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: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. > > 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. > > 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