Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1707037ybh; Mon, 20 Jul 2020 05:21:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVOt63oEpPMk+RzXIungSFmQvy1q4WJzQH08qsK/z3qKPhepr+wEANwzjP8fY7jE93fDKw X-Received: by 2002:aa7:cf02:: with SMTP id a2mr21676366edy.263.1595247669518; Mon, 20 Jul 2020 05:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595247669; cv=none; d=google.com; s=arc-20160816; b=uXoJ5MLqZ4f3u1VvrCeignQEuGkxDTa45kJ0pisuF5+bzAvbCPd9Hxz/i/U6T3bZ8R TLfK7Yyq/A7sTI3Z/Q/JyZOJjJnlcuKDepAm+59/LX9TeZFxSx5cuavu9WMESdYt7f2h qiLyudDFbEsZblgAIBM8I9+Dx5dgIXiiBBw+AV3Z90kCOZJTikYwEUAskfEOYn3Ov27r Wb5hfQdpuu0vpmbUw2/4VSrJ5GEYOSN7kmTMALfKcTKmAxWLSBN+iZlNK5dOI9abr1tY WGziN8lCygM8+xsUxXLETx8Z/8Yv7ny/J1MlNnZfwpSUw0AVLBqoF0T/moTO9l7QlpbN 09VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LYJXUOw05N4C98avK+t51D8ziAFb8zWS6I1OdN5DvFw=; b=LZZDa/6deaD/mP8oHx0+r/YftBkZtHibQC7K2pRyZpEXXHCS8wVyGaOYpeYGX4ZDyB gxg9FqZB7TJB8bQqDCHLnWI869oI/lgsJtjRJO3dVWf7qt95IvzB3pqPi7dnLZxcKgPS V2jVoHrIskWTJsGMlm+pb0YjEIuusB7m8ky9/Sjr80zcy2u7cmGef2z1Ag2SwyIDjuj/ 1wrrfv372b0s7nBLuRXGAste+TgWxZtiauvCJxHJ4I6jShmfFeqC3u0GwCf3tAKZXFyY ttGcRc3Wz3IBf+1i0BJUEyzV8bO06ESu4ATJB4V+KkVnddYVg+pWk1e2Yfp2Hp0uQFRl lGlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg21si9992123ejb.694.2020.07.20.05.20.46; Mon, 20 Jul 2020 05:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728766AbgGTMUf (ORCPT + 99 others); Mon, 20 Jul 2020 08:20:35 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7796 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728532AbgGTMUe (ORCPT ); Mon, 20 Jul 2020 08:20:34 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4DA5AACBF07D6CFCE4AD; Mon, 20 Jul 2020 20:20:30 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 20:20:22 +0800 From: Jing Xiangfeng To: , , , , CC: , , , Subject: [PATCH] clk: ti: clkctrl: add the missed kfree() for _ti_omap4_clkctrl_setup() Date: Mon, 20 Jul 2020 20:23:43 +0800 Message-ID: <20200720122343.178203-1-jingxiangfeng@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org _ti_omap4_clkctrl_setup() misses to call kfree() in an error path. Add the missed function call to fix it. Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name") Signed-off-by: Jing Xiangfeng --- drivers/clk/ti/clkctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 864c484bde1b..868e50132c21 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -655,8 +655,10 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) } hw = kzalloc(sizeof(*hw), GFP_KERNEL); - if (!hw) + if (!hw) { + kfree(clkctrl_name); return; + } hw->enable_reg.ptr = provider->base + reg_data->offset; -- 2.17.1