From: Wei Yongjun Date: Mon, 22 Aug 2016 16:08:21 +0000 (+0000) Subject: clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=718cc4b60ff279c0d6169d109e22cb107b23e312;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() 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 Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver") Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c index 61ef28a48631..b45c5fba7e35 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;