staging: vchiq_arm: Prefer kzalloc(sizeof(*waiter)...)

It's shorter and easier to maintain. This has been found with checkpatch.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1621105859-30215-11-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Stefan Wahren
2021-05-15 21:10:49 +02:00
committed by Greg Kroah-Hartman
parent 618150c125
commit a140f3a02a

View File

@@ -459,7 +459,7 @@ vchiq_blocking_bulk_transfer(unsigned int handle, void *data,
}
}
} else {
waiter = kzalloc(sizeof(struct bulk_waiter_node), GFP_KERNEL);
waiter = kzalloc(sizeof(*waiter), GFP_KERNEL);
if (!waiter) {
vchiq_log_error(vchiq_core_log_level,
"%s - out of memory", __func__);
@@ -962,8 +962,7 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance,
return -EINVAL;
if (args->mode == VCHIQ_BULK_MODE_BLOCKING) {
waiter = kzalloc(sizeof(struct bulk_waiter_node),
GFP_KERNEL);
waiter = kzalloc(sizeof(*waiter), GFP_KERNEL);
if (!waiter) {
ret = -ENOMEM;
goto out;