Skip to content

Commit a1bddf3

Browse files
elfringmpe
authored andcommitted
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: Markus Elfring <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent c86a939 commit a1bddf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/sysdev/axonram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static int axon_ram_probe(struct platform_device *device)
191191
dev_info(&device->dev, "Found memory controller on %pOF\n",
192192
device->dev.of_node);
193193

194-
bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
194+
bank = kzalloc(sizeof(*bank), GFP_KERNEL);
195195
if (bank == NULL) {
196196
rc = -ENOMEM;
197197
goto failed;

0 commit comments

Comments
 (0)