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 <elfring@users.sourceforge.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Markus Elfring 2017-08-03 20:00:16 +02:00 committed by Michael Ellerman
parent c86a93971e
commit a1bddf3991

View file

@ -191,7 +191,7 @@ static int axon_ram_probe(struct platform_device *device)
dev_info(&device->dev, "Found memory controller on %pOF\n",
device->dev.of_node);
bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
bank = kzalloc(sizeof(*bank), GFP_KERNEL);
if (bank == NULL) {
rc = -ENOMEM;
goto failed;