Commit 718cc4b6 authored by Wei Yongjun's avatar Wei Yongjun Committed by Stephen Boyd

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Fixes: f8c11f79 ("clk: meson: Add GXBB AO Clock and Reset controller driver")
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent f8c11f79
...@@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev) ...@@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct gxbb_aoclk_reset_controller *rstc; struct gxbb_aoclk_reset_controller *rstc;
rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL); rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
if (!rstc) if (!rstc)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment