提交 718cc4b6 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NNeil Armstrong <narmstrong@baylibre.com>
Fixes: f8c11f79 ("clk: meson: Add GXBB AO Clock and Reset controller driver")
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 f8c11f79
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册