[PATCH 1/5] fsl_hypervisor: Improve a size determination in fsl_hv_open()
From: SF Markus Elfring
Date: Sat May 20 2017 - 15:11:49 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 May 2017 19:52:38 +0200
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@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/virt/fsl_hypervisor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index d3eca879a0a8..d1df6c6740f1 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -659,5 +659,5 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
unsigned long flags;
int ret = 0;
- dbq = kzalloc(sizeof(struct doorbell_queue), GFP_KERNEL);
+ dbq = kzalloc(sizeof(*dbq), GFP_KERNEL);
if (!dbq) {
--
2.13.0