Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5724514imd; Wed, 31 Oct 2018 00:40:18 -0700 (PDT) X-Google-Smtp-Source: AJdET5cu0u5+VzQsQZeceu5Q/3CFQLoom/VJ6S9nhbmFeLBZhuUvXA+3lOilWXNDizqBzTg/hW/A X-Received: by 2002:a62:2f44:: with SMTP id v65-v6mr2172395pfv.235.1540971618282; Wed, 31 Oct 2018 00:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540971618; cv=none; d=google.com; s=arc-20160816; b=uNFfzS6mqycFHvg81f4Ql/uzhmaQW0t+fY5133fClR7IXHIHTBtMHXWsGMklfTR8wE 8ikB2yQx2f1yd3bkpj9izeFfmxslGnwAjKauYf/mcmYiLFJvcah/xWUrlyCeBArXxaiD by6D+QJo0rpCUl0/K51BGLkmK+xtNv202Wzk6hOz9b+I8PzeXpqrcOJ0p1lXneZQ9PJD X0JEvWRaIHRFza9K65hMymVM3Ml6XMM+FVpn1c1aP4S0PmJ7HZl1nn9+kwPAkE60KNoj Uo7zCjR2e9XjcCIBw3AXvfxfcqpjKMjVduFHEiauLfbh32xyT2C3NJQUCyWLFqSpBW5J To5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=wRIXR7gq62RYlPZaO+3U0GZjXlLu/z2ak5RuSWen5aQ=; b=aeugs3mj8lOO8pUYE0tueafnSachoR5YMohB47+6ztmHB8zmVQcrJM3mDCD0NhrRgp AfPpEIeiC2GJc/FmGUtqFAot9T4xTfbYYgnOqxiYVWG21zZIoCJ3gz8hfJ4Xy3NCVrlD e8VA7rdtNKyVQaZO21CuukqIqcrjj2yNv/X+dfEtZB6oVuOXRs/AgEMUPF1+oX4TpPoW /wb0XqAPAAYHqAb724VI/JNSXRElE1ZS5qozTYQ5aW148hJufykrMisLNoWiRsnTVdqf PdqbBuGMdgupJTpAK+xVxIkDNByBY41JX5btMqTDdLrYOKN+fDOxQgr2YTAeC7fjrpGo EJpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si17553891pfg.52.2018.10.31.00.40.01; Wed, 31 Oct 2018 00:40:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726549AbeJaQgh (ORCPT + 99 others); Wed, 31 Oct 2018 12:36:37 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:12624 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbeJaQgh (ORCPT ); Wed, 31 Oct 2018 12:36:37 -0400 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 29A48546F684D577C821; Wed, 31 Oct 2018 15:39:38 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id w9V7dSGe015250; Wed, 31 Oct 2018 15:39:28 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018103115395006-7800048 ; Wed, 31 Oct 2018 15:39:50 +0800 From: Yi Wang To: paul.burton@mips.com, sboyd@kernel.org Cc: mturquette@baylibre.com, linux-mips@linux-mips.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Yi Wang Subject: [PATCH v3 0/2] fix memory leak and unregister issue in clk_boston_setup() Date: Wed, 31 Oct 2018 15:41:40 +0800 Message-Id: <1540971702-3133-1-git-send-email-wang.yi59@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-10-31 15:39:50, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-10-31 15:39:20, Serialize complete at 2018-10-31 15:39:20 X-MAIL: mse01.zte.com.cn w9V7dSGe015250 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fix two issues in clk_boston_setup() function: - possible memory leak of 'onecell' - registered clks not unregister when error happens Changes from v2: - include smatch to the commit - unregister clks which registered before going out Yi Wang (2): clk: boston: fix possible memory leak in clk_boston_setup() clk: boston: unregister clks on failure in clk_boston_setup() drivers/clk/imgtec/clk-boston.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) -- 1.8.3.1