From patchwork Mon Aug 22 16:08:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9293807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FC60607D0 for ; Mon, 22 Aug 2016 16:10:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32B7328851 for ; Mon, 22 Aug 2016 16:10:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 271DD28890; Mon, 22 Aug 2016 16:10:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE32E28851 for ; Mon, 22 Aug 2016 16:10:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bbrmi-0003Ta-Uw; Mon, 22 Aug 2016 16:09:12 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bbrmf-0003LK-32; Mon, 22 Aug 2016 16:09:09 +0000 Received: by mail-pf0-x242.google.com with SMTP id y134so6586578pfg.3; Mon, 22 Aug 2016 09:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=21j+hExBNGffXw7wF7UwdR0xOS5wmtG6taE4hycg7HM=; b=i/sIcQSA889WA2Bbsd8kwP7UoAIuZReZmlKOulyeZLd/beDqCoCalEZTZSHeALyoFL 2FQsU3ummYngbCFAABOLlXT99/AeEU3Nf7Qz+EryzsJ3XKa4a5FbN+tDYWK8WXBbZxwT Ls2T4ASfzCHUuQZ3+SEvjLjVyQeQSIYsCeOuDdazvP6HDGoXBy+9g/a+iww0os5SO9MJ 0C3xhYQr26ApeRFhwf/LfdHS1Vl+LcUkblLOoFU3aN3zsC/iEFqz0f5ReNs6F/FcQgT0 lM7bGyQrkRiTdVC4M76NIg/hTtAiDURsyBxHydiq9zRUf7uRTjIrASoG6vxLL28x0zs1 sW5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=21j+hExBNGffXw7wF7UwdR0xOS5wmtG6taE4hycg7HM=; b=kUVQ82VBHVU1fvJ6mdnoPg7xSLJq0Z4z4HF5/LdatsoNFGe5c8ChzjeyZ+AEOIrsZK vK6mh2e0Hs0Bxnujl0t0d/Tu40AB2muelCVa/5kle0VtaQaKvggs07rQxPl9cYnenDyU 1U4V71RvxvuLtNXLZg9CDVXgqy7+Pgwum/MSB2uV/+hJQMR/XHdzE0BbC9o91qLZTUYr 86a9Dr13HH1/cUb+1bk56rUpiQ5ZUtysSqIylRL4L8Npj+KrRPtiXyni20K3oBteZfzP fvQIQboCoDZUvQnc4pmTCIx/58tLbAMyKeIyTi+tfhlJWTAJ1DX736No2MeDIcQMr/n1 17kw== X-Gm-Message-State: AEkoouuBGdYUA++tRQ8Hmv+Xm5lMa6fS3H6oYVN7E7sD4B4BH7et0YO3k9H3sDfixgJZ7g== X-Received: by 10.98.106.65 with SMTP id f62mr44041929pfc.107.1471882128049; Mon, 22 Aug 2016 09:08:48 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id l82sm28322214pfk.8.2016.08.22.09.08.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Aug 2016 09:08:47 -0700 (PDT) From: Wei Yongjun To: Michael Turquette , Stephen Boyd , Carlo Caione , Kevin Hilman , Neil Armstrong Subject: [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() Date: Mon, 22 Aug 2016 16:08:21 +0000 Message-Id: <1471882101-22347-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160822_090909_210225_27721881 X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Wei Yongjun , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun Acked-by: Neil Armstrong --- drivers/clk/meson/gxbb-aoclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c index 61ef28a..b45c5fb 100644 --- a/drivers/clk/meson/gxbb-aoclk.c +++ b/drivers/clk/meson/gxbb-aoclk.c @@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct gxbb_aoclk_reset_controller *rstc; - rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL); + rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL); if (!rstc) return -ENOMEM;