diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-03 20:00:16 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-09-01 16:42:56 +1000 |
commit | a1bddf3991573f3dff2762bfca5e113f19889d5a (patch) | |
tree | 36697d653d3fdd9cab8d5e325b39544bf0d010ab /arch | |
parent | c86a93971ec7134672333e5a9758368a909d0854 (diff) | |
download | linux-a1bddf3991573f3dff2762bfca5e113f19889d5a.tar.gz linux-a1bddf3991573f3dff2762bfca5e113f19889d5a.tar.bz2 linux-a1bddf3991573f3dff2762bfca5e113f19889d5a.zip |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 89736bb65af9..ae359d78b7db 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c @@ -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; |