Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbdL2ODD (ORCPT ); Fri, 29 Dec 2017 09:03:03 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:58620 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbdL2ODB (ORCPT ); Fri, 29 Dec 2017 09:03:01 -0500 Date: Fri, 29 Dec 2017 15:02:50 +0100 From: Paul Cercueil Subject: Re: [PATCH 4/6] clk: ingenic: Add JZ47xx TCU clocks driver To: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Thomas Gleixner , Jason Cooper , Marc Zyngier , Daniel Lezcano , Lee Jones Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-Id: <1514556170.2198.0@smtp.crapouillou.net> In-Reply-To: <20171229125942.27305-5-paul@crapouillou.net> References: <20171229125942.27305-1-paul@crapouillou.net> <20171229125942.27305-5-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 381 Lines: 16 [...] > + tcu->clocks.clk_num = nb_clks; > + tcu->clocks.clks = kcalloc(nb_clocks, sizeof(struct clk *), > GFP_KERNEL); > + if (!tcu->clocks.clks) { > + pr_err("%s: cannot allocate memory\n", __func__); > + goto err_free_tcu; > + } Facepalm. A quick edit from kzalloc to kcalloc and I managed to break it. It should be nb_clks not nb_clocks. I'll fix that in the V2. -Paul