From patchwork Fri Sep 12 13:39:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 37323 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E7A0A203EE for ; Fri, 12 Sep 2014 13:39:05 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gi9sf492199lab.7 for ; Fri, 12 Sep 2014 06:39:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=RK/e+E9FX3empdwO5YQgkOFYVCMf1K6ulIwrCo8IKvw=; b=QALvN9j+q7vbu/KZfQfZT0Hxf9evhR1cjAdKMBV6xzH5qFBa5+hLhGlBdYInUEGZLO e85Pi/S8BKar15bqtGtTOOf5yFOi0XVNNfsJcJIF9ipMY7SZ7Mb3mYtdJq/i/WbE7yKX u7XMMZJYbIuwV2CfQHjZ/SpDsixAYtxOHI3bDAdNKLFifeBgg6P6/ubphYj6R+pmJxx0 qH1eKF0w0UUAeJfYib15gAOv7vCNBv2NCW7OHNuUo7Ts9cjELhTsjGrFbtsIfHFv7aEw 0aMwhEU6Rb5qtUX2kWjRNE2hsoaLFPwY3upg2WNuoWwE5nbRIHTreWIYdx/+RbnCYGbO cbhQ== X-Gm-Message-State: ALoCoQmAUaPCtKJfwu4WlzvUSoT0r53mRdWJh8ZOgsfs09vi7nvkDbDzRlwxZ+Gbc+RwUcPJDepm X-Received: by 10.112.122.71 with SMTP id lq7mr813903lbb.16.1410529143298; Fri, 12 Sep 2014 06:39:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.193 with SMTP id x1ls186145lae.53.gmail; Fri, 12 Sep 2014 06:39:03 -0700 (PDT) X-Received: by 10.152.3.35 with SMTP id 3mr9184432laz.5.1410529143158; Fri, 12 Sep 2014 06:39:03 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx.google.com with ESMTPS id wg8si6582220lbb.73.2014.09.12.06.39.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 06:39:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id gi9so943684lab.38 for ; Fri, 12 Sep 2014 06:39:02 -0700 (PDT) X-Received: by 10.112.75.233 with SMTP id f9mr8646796lbw.102.1410529142682; Fri, 12 Sep 2014 06:39:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.141.42 with SMTP id rl10csp733377lbb; Fri, 12 Sep 2014 06:39:01 -0700 (PDT) X-Received: by 10.66.66.193 with SMTP id h1mr8773234pat.93.1410529140568; Fri, 12 Sep 2014 06:39:00 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wy1si8057600pab.66.2014.09.12.06.38.59 for ; Fri, 12 Sep 2014 06:39:00 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753972AbaILNi7 (ORCPT + 5 others); Fri, 12 Sep 2014 09:38:59 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:51072 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753846AbaILNi6 (ORCPT ); Fri, 12 Sep 2014 09:38:58 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s8CDcZ04020171; Fri, 12 Sep 2014 08:38:35 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8CDcZnT017141; Fri, 12 Sep 2014 08:38:35 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 12 Sep 2014 08:38:34 -0500 Received: from sokoban.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8CDcWnK027491; Fri, 12 Sep 2014 08:38:33 -0500 From: Tero Kristo To: CC: , Mike Turquette , Peter Ujfalusi Subject: [PATCH] clk: ti: dra7-atl-clock: fix a memory leak Date: Fri, 12 Sep 2014 16:39:07 +0300 Message-ID: <1410529147-19950-1-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: t-kristo@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , of_clk_add_provider makes an internal copy of the parent_names property while its called, thus it is no longer needed after this call and can be freed. Signed-off-by: Tero Kristo Cc: Mike Turquette Cc: Peter Ujfalusi Acked-by: Peter Ujfalusi --- drivers/clk/ti/clk-dra7-atl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c index 4a65b41..3f9308a 100644 --- a/drivers/clk/ti/clk-dra7-atl.c +++ b/drivers/clk/ti/clk-dra7-atl.c @@ -199,6 +199,7 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node) if (!IS_ERR(clk)) { of_clk_add_provider(node, of_clk_src_simple_get, clk); + kfree(parent_names); return; } cleanup: