Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp210946pxb; Mon, 25 Apr 2022 08:36:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNH6R0j7Qd1zn3VweAncB1OPFTAKt2h6rS3TgD7aPQ1++ciWYWOOJTVZk2cz+dsET3l+hf X-Received: by 2002:aa7:d310:0:b0:425:f22f:763f with SMTP id p16-20020aa7d310000000b00425f22f763fmr3115252edq.163.1650901012916; Mon, 25 Apr 2022 08:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650901012; cv=none; d=google.com; s=arc-20160816; b=Fr8BpkiTBUECjMjsdQaR5QQI0xwA2GQIFgqZt+u1oSD2pb+dtqxDJHKDBgxSe6nvBy XF+yq15+OncpzEzXJ8PDd1MwRG3tFexQULQ5tIA2iZs1OLvfcEgEuUzMBqlw++UF58tU Rp20V6sOfIvBpcZUjR0EuJgt1/x+1xNDBuxBixvahVNLw5SANoqsLbOR7sNU/tDMLAwX H2G0BR8Z7i6Bj1hRKjZ7sk3oyiAAwFRwXoWJwqUm7KfLqtQqCvO1ra6XqgsWcRkE8m7+ 2saty+yARSNrficsrMOwU61qb+6vtCu9lXbYsBf6W+frTYDRokpuPwJzt95/x5dWCZ4e cKJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yVOHIop480qd4Gr/LYjCSPrgKYLop4lt8wSVfH5qvF0=; b=iaVcE7CWdGWsrs6JzJZEdbGiKNLYVBwNb0J9tJw2aEkljtb2Zxv5bhRNsHIviQOAVV 0wlphuKH73ZeLniDHwhkWhIzwB8fRpovEKw+j6K9MwqBmXBGjwL1M+N/kaUO1WJfXMVR DY6rTWVfvGUD8ZwwwzYRFTJ20NfzB2Wb7WofYJjQpB1SEsxRhqtIK68jaFmXtRggJSVO gvpDxDfr28k7Ur2V4qdQkgl/FCe5LqlAOXOzgPfLZePN+lMj6sxY0lmuKZutrm3LGQYt fz3Cd3OcBjCLeymYRx6glZQpGOtZZvhIqYURFLs7pluQXPkl+A8Q3+PyZNqXwxsE/9aT yg0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=TrUTwR7k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a056402280200b0041d8586ad52si15058437ede.218.2022.04.25.08.36.27; Mon, 25 Apr 2022 08:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=TrUTwR7k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239406AbiDXTjc (ORCPT + 99 others); Sun, 24 Apr 2022 15:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239339AbiDXTj2 (ORCPT ); Sun, 24 Apr 2022 15:39:28 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CB3932EF8; Sun, 24 Apr 2022 12:36:25 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id p18so11004181edr.7; Sun, 24 Apr 2022 12:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yVOHIop480qd4Gr/LYjCSPrgKYLop4lt8wSVfH5qvF0=; b=TrUTwR7kbvxcWabpO31VkDST1D26rIHkqeg351cvGg9gtptLAvDealNIt/RGogS5Bh d3EhuP5daLZq54Bt2ZPHUdF8SzNbv8BpALtrktPx7wkDMRJQlRXMiNhXiFSeoUAl8OfZ 1692tOWuiNTLpovvo90VfOT7jQhOslWy8QQgCeFjZjQMRsFbhtyfwxFDwlV6Pe5I+5DX c9r6RZaZspORLPC/LRc4aq7gs0cvaGENDsFdNreWwn9U/d+nvF2WV5lrJEjNP2gOYaPW Ip8nOiM1SEWXQYSyOTojv/vDxnovsZdX/g5N4uaUqPTkCDgWfIhyHrzo+kLD0AfkQdrD OHWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yVOHIop480qd4Gr/LYjCSPrgKYLop4lt8wSVfH5qvF0=; b=d/kx7aL5GbVR7VW6cw+p5APdYTU7uRNJN/0VKSbRftyBOyBINtClJA0AH19NhCljhu kWRl+a9NaF6vFwetuaEY0LcHZfE6oDBaTfVpw+niziaRW6xz1Y7W6PLSgpZY0+gH6Yif ZnR558PG6cpuehkGiGzFlvXTbVrGj7AAHqopUygY6ZnTFB9kj3WhfsQx2VQo/w4QbLg4 HxKaYb85Ik68GJSQLJ0nDd/uCMTcd/iMQDkNDbi54qrTTCfyrlQSLrc6icrBsxlFqyKI IlAR9ivOD0kfUBzo/WrvfbEafb/f7UDEpBX7g1DBYPW6Zr8QWqA7Y7pxJLStAKB7g7T9 VleA== X-Gm-Message-State: AOAM533/JQCuJzDLfmn/XXQrJ8mU0fqszd885cSQiwEPS5f3SpeXAmS0 hfgSx8+0RjB4uKkxsqcAaE0uIQbVWlVtmNpgo9g= X-Received: by 2002:a50:ed0e:0:b0:425:e476:f4ed with SMTP id j14-20020a50ed0e000000b00425e476f4edmr2696289eds.32.1650828983747; Sun, 24 Apr 2022 12:36:23 -0700 (PDT) MIME-Version: 1.0 References: <20220423022541.B12F3C385A0@smtp.kernel.org> In-Reply-To: <20220423022541.B12F3C385A0@smtp.kernel.org> From: Martin Blumenstingl Date: Sun, 24 Apr 2022 21:36:12 +0200 Message-ID: Subject: Re: [PATCH] clk: meson: meson8b: fix a memory leak in meson8b_clkc_init_common() To: Stephen Boyd Cc: xkernel.wang@foxmail.com, Neil Armstrong , jbrunet@baylibre.com, mturquette@baylibre.com, khilman@baylibre.com, p.zabel@pengutronix.de, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, On Sat, Apr 23, 2022 at 4:25 AM Stephen Boyd wrote: [...] > > Also a note about meson8b_clkc_init_common() itself: failures in that > > function will result in a non-working system. > > If we can't register the reset controller then most devices won't > > probe and CPU SMP cannot work. > > If registering any clock or the clock controller doesn't work then the > > system also won't work as clocks are not available to other drivers. > > So freeing memory in case of an error is good to have, but the end > > result is still the same: the system won't work. > > > > Can we get far enough to record this fact into either a pstore ramoops > location or the serial console? That would be ideal to make debugging > early problems easier. earlycon shows these messages (as it's enabled by the bootloader) while "normal" serial console won't come up without the corresponding clocks. I never tried ramoops but I expect it to be able to log these errors as well. Best regards, Martin