Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5290736rwd; Mon, 12 Jun 2023 02:56:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5JlKobQejCvrjJLsvlM9mWkEpG5qasBBmkwjJ3UhVyxyaGCQZdIeqDYSYqFmts/ojDhUlx X-Received: by 2002:a2e:2c14:0:b0:2a8:d13d:88fb with SMTP id s20-20020a2e2c14000000b002a8d13d88fbmr2625379ljs.11.1686563804962; Mon, 12 Jun 2023 02:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686563804; cv=none; d=google.com; s=arc-20160816; b=nVjfgyqGYv1Cin3DHLPEQS1hKTVsLOigvKI3IUODnqoPdg9eHCD1tN5sK5lgNgOL2T ENWT7xphT1DlwrqlUJlzmtuvOAo1pQ1SrAwUJZG+Xx/7XOdud4RATb2l5rCjiJUZblEA cdQA2xt3+CqOyUlivYwp4Hbk7mD3oVDPFl9FaYzrhtWGi1dgdE1E2grNycg/ssp2fOc6 lCkHEMS17pSNwG7RkzEKVC8SoiZLDoFL2UUpnegw1nV3AfKl9RtumNo1sqNrJitkHRUQ S2QSXtsgzw3nHQiyl0Ru7Y3w9mwJBYIwRt89ZlNl8c53R/6yNLu56NIVMIH/MDg4cwWM dMSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sn1KmoSk4w+76jXteo+X6vERxlyroWl5Pa1iBI+YhcU=; b=jgWq5IWRKG49Tg3SiDhznvduwEKTEtfMGCjOQYHv1/tpvwIxTqxkviTkfxobYIjLs2 2bRjC1BemjfIZ5a4GmrcuQwcSYm+QRDtRjKcRU77SUIEn11iAeJ2CvYPLFxGjvrqCxix PxbiVjLANUyVB5CPuUszLVjiiM69f0SEWt/85/ppc2Ml4qm1RHLsK7eglFgg2m2IuhmB Xhezb2XzZDjAw+rVCIJAR2KRk6+lULAOtJXvrNiJNIJ1TKB0gm8XDaqXtavioEYmBUD7 AJxPskm7YGExU1NihxXWjS2yAfUC29LkBS68EeDdPJ33KiuwNaps97jFYCWDo36rqpXR 9Umg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aKH7YgYs; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j21-20020aa7c0d5000000b00514959358f6si5787252edp.157.2023.06.12.02.56.09; Mon, 12 Jun 2023 02:56:44 -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=@linaro.org header.s=google header.b=aKH7YgYs; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234846AbjFLJse (ORCPT + 99 others); Mon, 12 Jun 2023 05:48:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230457AbjFLJrq (ORCPT ); Mon, 12 Jun 2023 05:47:46 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05293A5EB for ; Mon, 12 Jun 2023 02:34:35 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9786fc23505so610433366b.2 for ; Mon, 12 Jun 2023 02:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686562410; x=1689154410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sn1KmoSk4w+76jXteo+X6vERxlyroWl5Pa1iBI+YhcU=; b=aKH7YgYs7NdNLNjRM9saAyjtg6C3B3PKNqk8EubOZ6PjsYpJobwp71ACl+zvOE1iZb 9thz1H5IUgtL/SCUeJXGYRkmj5KgbZpHFsQDcZbwv/2q/YRrc+fPbfiSYYV9O/sw6+Rr L3y8KeFvzqgT+g6J29ILMtchcRVu9zG1HOLeELMUENtL5YmqiXb79aLY8GRTERxHEko8 sbyoJuu7t5BHvloNCYKfQ0NwIPWoiZ4YwurXL6XjL2RNPfxGoaq57IOBZbKqyDFR4Vuk 175cfzC//CjQ3tTQubUK9eP2vVSP+DgR1Dn2lbHf5v6MSaq8WkFSEnm0R6jW1Pl6st8z VClQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686562410; x=1689154410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sn1KmoSk4w+76jXteo+X6vERxlyroWl5Pa1iBI+YhcU=; b=EWl/Re0Y/ysHyvWzJ11z+3SbHHibkPD8StriEHY/J5dsp7uMw7EAjqBrYK6thVUzvt AiWdop8ziJvRnICIadV7n8gEt3DNUzhCPzWDbXNErKuL+ZUsCBMz4vQz4hGNCrlK+ENy lNzT1/GIeGwLfbVS/Xm1QKJ7uA5xVrPeIBIRDZGqKL9XGeWo6/f1foHZCaGia3/BzKcl +2z8y1qNNL1wPEuZvektveQ0U32V+ke+61sCSc/J4Mo84Js6UNDLsg2FXrOWc+cB9pXb cTTdvkx0w89h0Gj7XaAAbqTCQ/Vof3sEDhKmkVPGPHAMEJQk+CFEOuWym6ablwNjDznZ 3VUQ== X-Gm-Message-State: AC+VfDw9FPGFF0VptvLrpS8nEjyhhjXbuYGF3+rzr3EOVqJ1W/22rS7C W349bX5PYZgZVb55Li5KXz7K7A== X-Received: by 2002:a17:906:ef07:b0:96f:7b4a:2904 with SMTP id f7-20020a170906ef0700b0096f7b4a2904mr9276446ejs.3.1686562409808; Mon, 12 Jun 2023 02:33:29 -0700 (PDT) Received: from hackbox.lan ([86.121.163.20]) by smtp.gmail.com with ESMTPSA id gj13-20020a170906e10d00b00965a56f82absm4908151ejb.212.2023.06.12.02.33.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 02:33:29 -0700 (PDT) From: Abel Vesa To: Abel Vesa , Peng Fan , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Zhanhao Hu Cc: hust-os-kernel-patches@googlegroups.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] clk: imx93: fix memory leak and missing unwind goto in imx93_clocks_probe Date: Mon, 12 Jun 2023 12:32:40 +0300 Message-Id: <168656228140.662397.4112940711975875013.b4-ty@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601033825.336558-1-zero12113@hust.edu.cn> References: <20230601033825.336558-1-zero12113@hust.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, 01 Jun 2023 03:38:25 +0000, Zhanhao Hu wrote: > In function probe(), it returns directly without unregistered hws > when error occurs. > > Fix this by adding 'goto unregister_hws;' on line 295 and > line 310. > > Use devm_kzalloc() instead of kzalloc() to automatically > free the memory using devm_kfree() when error occurs. > > [...] Applied, thanks! [1/1] clk: imx93: fix memory leak and missing unwind goto in imx93_clocks_probe commit: e02ba11b457647050cb16e7cad16cec3c252fade Best regards, -- Abel Vesa