Re: [PATCH v2] staging: fluke_gpib: use kzalloc instead of kmalloc + memset

From: Dan Carpenter

Date: Thu Nov 27 2025 - 00:58:23 EST


On Wed, Nov 26, 2025 at 09:45:49PM +0100, Tomasz Sadowski wrote:
> v2:
> - Add proper commit description
> - No changes in patch
>

This stuff needs to go under the --- cut off line.

> Use kzalloc() instead of kmalloc() + memset() to simplify memory allocation.
>
> Also use sizeof(*board->private_data) instead of repeating the struct name.
> This avoids duplication and keeps the code correct if the struct name
> changes in the future.
>
> Signed-off-by: Tomasz Sadowski <tsdwski@xxxxxxxxx>
> ---
^^^

Here.

regards,
dan carpenter