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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=BAYES_00,DATE_IN_PAST_03_06, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8F48C2BBD5 for ; Sat, 5 Dec 2020 18:44:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9584C22E00 for ; Sat, 5 Dec 2020 18:44:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728062AbgLESnr (ORCPT ); Sat, 5 Dec 2020 13:43:47 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:40402 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbgLESnn (ORCPT ); Sat, 5 Dec 2020 13:43:43 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1klYZV-00AMfz-Ck; Sat, 05 Dec 2020 15:30:01 +0100 Date: Sat, 5 Dec 2020 15:30:01 +0100 From: Andrew Lunn To: Claudiu Beznea Cc: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, nicolas.ferre@microchip.com, linux@armlinux.org.uk, paul.walmsley@sifive.com, palmer@dabbelt.com, yash.shah@sifive.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 3/7] net: macb: unprepare clocks in case of failure Message-ID: <20201205143001.GC2420376@lunn.ch> References: <1607085261-25255-1-git-send-email-claudiu.beznea@microchip.com> <1607085261-25255-4-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1607085261-25255-4-git-send-email-claudiu.beznea@microchip.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 02:34:17PM +0200, Claudiu Beznea wrote: > Unprepare clocks in case of any failure in fu540_c000_clk_init(). Hi Claudiu Nice patchset. Simple to understand. > > +err_disable_clocks: > + clk_disable_unprepare(*tx_clk); > + clk_disable_unprepare(*hclk); > + clk_disable_unprepare(*pclk); > + clk_disable_unprepare(*rx_clk); > + clk_disable_unprepare(*tsu_clk); This looks correct, but it would be more symmetrical to add a macb_clk_uninit() function for the four main clocks. I'm surprised it does not already exist. Andrew