提交 a1bddf39 编写于 作者: M Markus Elfring 提交者: Michael Ellerman

axonram: Improve a size determination in axon_ram_probe()

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 c86a9397
...@@ -191,7 +191,7 @@ static int axon_ram_probe(struct platform_device *device) ...@@ -191,7 +191,7 @@ static int axon_ram_probe(struct platform_device *device)
dev_info(&device->dev, "Found memory controller on %pOF\n", dev_info(&device->dev, "Found memory controller on %pOF\n",
device->dev.of_node); device->dev.of_node);
bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL); bank = kzalloc(sizeof(*bank), GFP_KERNEL);
if (bank == NULL) { if (bank == NULL) {
rc = -ENOMEM; rc = -ENOMEM;
goto failed; goto failed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册