From patchwork Tue Oct 29 10:50:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 21265 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9B15920354 for ; Tue, 29 Oct 2013 10:51:40 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wp18sf17769944obc.1 for ; Tue, 29 Oct 2013 03:51:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JzmamX/YXk1DKUV9BOq0eTkHKN9iMO6NETVX+QkrTP0=; b=d/Vv0kqqYaumZWLU08AwPj+QY0VM5XdtQGr01zyuSwDWk/rp/7hEhliPHXlHYZ5Mn+ TvA6Js93ynSrB5PD/ml1VGzJd4Njk6NRRyxBNDzZmp1XbdnBa3dNMD3a+SzAD3XVGXE7 tWVyoGZfpiw4eeu6cCBaTGQYYNGvXJYijFLAEvIVE8MIpSWZSOFb3xOzPvqfAdFa3zfB 8+svc87YwVPnz1pBUrgpQMRlO2S/V3PwH5DdMz+jPGyqarAJ51sRXveZFSq/DGe9RbCv kHLqfgewAyCTbGqWDZ3buu5PGLWWuXCJji9/695qJjnmRtGz78LYGYVSp5gpyyQTsevA Q97A== X-Gm-Message-State: ALoCoQlwlgIiZqpwEsZPBkvO637II3lQauQePWQvNx5aV2zoDLN3nV9ZWU2bZKDhov6BdMNCxnIx X-Received: by 10.50.3.40 with SMTP id 8mr6742981igz.1.1383043899934; Tue, 29 Oct 2013 03:51:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.64.68 with SMTP id m4ls18603qes.5.gmail; Tue, 29 Oct 2013 03:51:39 -0700 (PDT) X-Received: by 10.58.233.98 with SMTP id tv2mr16511194vec.11.1383043899793; Tue, 29 Oct 2013 03:51:39 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id dp7si6784761ved.111.2013.10.29.03.51.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 03:51:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id c14so4458898vea.13 for ; Tue, 29 Oct 2013 03:51:39 -0700 (PDT) X-Received: by 10.58.11.73 with SMTP id o9mr16504558veb.8.1383043899652; Tue, 29 Oct 2013 03:51:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp192413vcz; Tue, 29 Oct 2013 03:51:39 -0700 (PDT) X-Received: by 10.66.216.162 with SMTP id or2mr815076pac.179.1383043898677; Tue, 29 Oct 2013 03:51:38 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id dk5si14582857pbc.106.2013.10.29.03.51.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 03:51:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.54; Received: by mail-pa0-f54.google.com with SMTP id fa1so6809489pad.41 for ; Tue, 29 Oct 2013 03:51:38 -0700 (PDT) X-Received: by 10.68.254.164 with SMTP id aj4mr845935pbd.161.1383043898130; Tue, 29 Oct 2013 03:51:38 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id og5sm34150810pbb.10.2013.10.29.03.51.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 03:51:37 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: mturquette@linaro.org, patches@linaro.org Subject: [PATCH] clk: Zero-initialize memory for new clock in devm_clk_register Date: Tue, 29 Oct 2013 16:20:19 +0530 Message-Id: <1383043819-9123-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Earlier to commit 64c862a839a8 ("devres: add kernel standard devm_k.alloc functions") devres_alloc API used to zero-initialize the devres allocated object, but now only the devres header is zero-initialized. Since clk_register zero-initializes the memory while allocating for a new clock, passing explicit flag __GFP_ZERO to devres_alloc in devm_clk_register to match the behaviour. Signed-off-by: Tushar Behera --- drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 2cf2ea6..ea3f2b9 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1932,7 +1932,8 @@ struct clk *devm_clk_register(struct device *dev, struct clk_hw *hw) struct clk *clk; int ret; - clk = devres_alloc(devm_clk_release, sizeof(*clk), GFP_KERNEL); + clk = devres_alloc(devm_clk_release, sizeof(*clk), + GFP_KERNEL|__GFP_ZERO); if (!clk) return ERR_PTR(-ENOMEM);