Skip to content

Commit

Permalink
clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
Browse files Browse the repository at this point in the history
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 <weiyongjun1@huawei.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Fixes: f8c11f7 ("clk: meson: Add GXBB AO Clock and Reset controller driver")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  • Loading branch information
Wei Yongjun authored and Stephen Boyd committed Aug 24, 2016
1 parent f8c11f7 commit 718cc4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/meson/gxbb-aoclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 718cc4b

Please sign in to comment.