mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
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:
committed by
Greg Kroah-Hartman
parent
618150c125
commit
a140f3a02a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user