diff options
author | Simon Sandström <simon@nikanor.nu> | 2017-07-30 23:29:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-17 01:10:42 +0300 |
commit | 8bf48512916a3fce7201f7d469d304a7824a87d4 (patch) | |
tree | 01a23f1a511e05b2fd53eab028b76acdf7050ac8 /drivers/staging/ccree/ssi_driver.c | |
parent | b4bac77f2a2e3faada7313e8f6b8b4fcca7e07b8 (diff) | |
download | linux-8bf48512916a3fce7201f7d469d304a7824a87d4.tar.xz |
staging: ccree: Use sizeof(variable) in memory allocs
Fixes 9 checkpatch.pl warnings of type
"Prefer kmalloc(sizeof(variable)...) over kmalloc(sizeof(type)...)"
in staging/ccree.
Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree/ssi_driver.c')
-rw-r--r-- | drivers/staging/ccree/ssi_driver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index a4ab9ef4baf7..88b68c81556c 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -223,7 +223,8 @@ static int init_cc_resources(struct platform_device *plat_dev) struct resource *req_mem_cc_regs = NULL; void __iomem *cc_base = NULL; bool irq_registered = false; - struct ssi_drvdata *new_drvdata = kzalloc(sizeof(struct ssi_drvdata), GFP_KERNEL); + struct ssi_drvdata *new_drvdata = kzalloc(sizeof(*new_drvdata), + GFP_KERNEL); struct device *dev = &plat_dev->dev; struct device_node *np = dev->of_node; u32 signature_val; |