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 11878C433EF for ; Thu, 3 Feb 2022 09:49:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349870AbiBCJti (ORCPT ); Thu, 3 Feb 2022 04:49:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240382AbiBCJt1 (ORCPT ); Thu, 3 Feb 2022 04:49:27 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24481C06173B; Thu, 3 Feb 2022 01:49:27 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id C70081F45306 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1643881765; bh=emPU3XQgWpbANmBHfWeZ41kek+W9O8z3OgW+v2jZ4Ic=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nwiV+5tA1fw4hZW7ev7s6GcS68wu0Xxvz5R8eJbBEKL/0HZKRiOg9I1Ppk4iaVr1A bmunhmUJw+0BxDsh3Kr+/yGp082qHRgdr6qEtYZ7goQ3CQu906rOcF5E5k/1I6Yyiq vxGX35DSz/bNQiAKAUW2ofAzm3WrMGoZVkvoxYKq1xnjiLEKaqTEskrWwDfuEL6D1y TgzROM7OLRRamI7m1LFhFo+nVR8WGaAyUYMjSG5ENkAcgH0fezOTQkRZA5djmWv9ry y1Jm98oc1wv2kr/8ALes+Wtvu5alh3yOCyXjhBdiqkz9X0Kqy/chTybW+CTt1i5rkm wF25PXvmK/Wzg== Message-ID: <10c53bcd-e8a6-d358-4cf6-393e6152863e@collabora.com> Date: Thu, 3 Feb 2022 10:47:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v2 22/31] clk: mediatek: gate: Implement error handling in register API Content-Language: en-US To: Chen-Yu Tsai , Stephen Boyd , Michael Turquette , Matthias Brugger Cc: Chun-Jie Chen , Miles Chen , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220202134834.690675-1-wenst@chromium.org> <20220202134834.690675-23-wenst@chromium.org> From: AngeloGioacchino Del Regno In-Reply-To: <20220202134834.690675-23-wenst@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 02/02/22 14:48, Chen-Yu Tsai ha scritto: > The gate 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, is done in the new error path. > > Signed-off-by: Chen-Yu Tsai > Reviewed-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno