Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b10adba authored by Markus Elfring's avatar Markus Elfring Committed by Stephen Boyd
Browse files

clk: ux500: Improve sizeof() usage



Replace the specification of data structures by pointer
dereferences as the parameter for the operator "sizeof" to make
the corresponding size determination a bit safer according to the
Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 7a294dc6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static struct clk *clk_reg_prcc(const char *name,
		return ERR_PTR(-EINVAL);
	}

	clk = kzalloc(sizeof(struct clk_prcc), GFP_KERNEL);
	clk = kzalloc(sizeof(*clk), GFP_KERNEL);
	if (!clk)
		return ERR_PTR(-ENOMEM);

+1 −1
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ static struct clk *clk_reg_prcmu(const char *name,
		return ERR_PTR(-EINVAL);
	}

	clk = kzalloc(sizeof(struct clk_prcmu), GFP_KERNEL);
	clk = kzalloc(sizeof(*clk), GFP_KERNEL);
	if (!clk)
		return ERR_PTR(-ENOMEM);

+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static struct clk *clk_reg_sysctrl(struct device *dev,
		return ERR_PTR(-EINVAL);
	}

	clk = devm_kzalloc(dev, sizeof(struct clk_sysctrl), GFP_KERNEL);
	clk = devm_kzalloc(dev, sizeof(*clk), GFP_KERNEL);
	if (!clk)
		return ERR_PTR(-ENOMEM);