Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1304642imm; Tue, 22 May 2018 01:45:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqkMA6m71qhhhtZgmoNJ3SWmXiTRblRbVQ3KI7cunY1cQnrltMjhWzdnXGfxmNVNPITWDjS X-Received: by 2002:a63:9517:: with SMTP id p23-v6mr15657851pgd.183.1526978729901; Tue, 22 May 2018 01:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526978729; cv=none; d=google.com; s=arc-20160816; b=ZGVjuInjWYwCJTX9rHWYtvDq/7mbF7mqyXJD3WqQ+kSFfaIZAOqSb0VrOZN+tEDZ+u 89Fz9mcbCJyJauhub1g5gAJdVwgNSFv0VeLxKtP+ONKrOz1wiWBKVcbJBElF6SnWqwQA 5YCGn6DP37nY77sV/UaqXeWSHUi075iBE/Q+aeWfeM0J0dXfP872ZX6G8PUj23eG6qch 8N8BBuEWUOsgCOWFU/r417ycthPlfqQP5x5TkmpFcx0sOZKKc4gozWAyXETNvs3jTAvZ h3/4K8n1EVf4WOSTLbCSr1Q0yBbQyHQI6QaKDlcOo1QzvpJFjI3aq35CNvQCrDCDXoLE M4Kg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=KCdkYO3wIFSuMZxYMiMv4ZiJpYvsRs8FlaB7ZPBFHyU=; b=uF0TzPLfCr0kmKyPZ5tYXME6GtN/BNBGkFxe6kYPEy2Eh4kO3wuGeZ4Z+SNWF+0Zr/ X6h94Wweo2z/FukWo125FzHLah6xGXh+JL+uQBIz7bpwwPb1y66j0lM/JERrVnkIR/Vm p4N7U/pZoDsfw9jZdwVKp1LlJkE42bCHZ6x1QZGBabr/qtdBkTw6Cm2Ch17LMye8k+A4 012rivm+TSKEol8YO/yBbU7O/94EccZcUceYH3i7c22KR19cQCY8RGZROBqkqptBU+Ek G9MR/3v8uo2rRlwZF0gzu7O1YM8O7D6MLLxbAL5g9qUhm6JshK0LrYwTP8CocqK3JpaP 8ubw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TMLgSd7T; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 205-v6si9214727pgf.604.2018.05.22.01.45.15; Tue, 22 May 2018 01:45:29 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TMLgSd7T; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbeEVIpC (ORCPT + 99 others); Tue, 22 May 2018 04:45:02 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:43280 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbeEVIo5 (ORCPT ); Tue, 22 May 2018 04:44:57 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4M8hroX024289; Tue, 22 May 2018 03:43:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1526978633; bh=KCdkYO3wIFSuMZxYMiMv4ZiJpYvsRs8FlaB7ZPBFHyU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=TMLgSd7T+jok10O3MHkUINszTxeHMl1BjOncghYX+XeXjw1LXncHOXcVJcU9ZxyPW dCc74m+OXhEGPInyXHrmhKcSvexpq9YiiBGnabmvjonZV/RCuaTFuOxMK5chq+49G3 LAr0yt/1+jR/o2WPPf2EgrjA5KimwTqnruESIL6U= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4M8hrdV000426; Tue, 22 May 2018 03:43:53 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 22 May 2018 03:43:53 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 22 May 2018 03:43:53 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4M8hiLv014056; Tue, 22 May 2018 03:43:45 -0500 Subject: Re: [PATCH v11 01/27] clk: davinci: pll: allow dev == NULL To: David Lechner , , , CC: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , References: <20180518164829.27052-1-david@lechnology.com> <20180518164829.27052-2-david@lechnology.com> From: Sekhar Nori Message-ID: Date: Tue, 22 May 2018 14:13:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180518164829.27052-2-david@lechnology.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 18 May 2018 10:18 PM, David Lechner wrote: > @@ -711,11 +777,11 @@ int of_davinci_pll_init(struct device *dev, > int n_clks = max_sysclk_id + 1; > int i; > > - clk_data = devm_kzalloc(dev, sizeof(*clk_data), GFP_KERNEL); > + clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL); > if (!clk_data) > return -ENOMEM; > > - clks = devm_kmalloc_array(dev, n_clks, sizeof(*clks), GFP_KERNEL); > + clks = kmalloc_array(n_clks, sizeof(*clks), GFP_KERNEL); > if (!clks) > return -ENOMEM; This should be: if (!clks) { kfree(clk_data); return -ENOMEM; } With that fixed: Reviewed-by: Sekhar Nori Thanks, Sekhar