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

Commit a1bddf39 authored by Markus Elfring's avatar Markus Elfring Committed by Michael Ellerman
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent c86a9397
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;