Re: [PATCH] serial: 8250_ni: use kzalloc_obj() for allocation

From: Chaitanya Vadrevu

Date: Tue Feb 17 2026 - 17:03:42 EST


> Replace kzalloc() with the preferred kzalloc_obj() helper
> to address a checkpatch warning.
>
> Signed-off-by: Pete Connor <pete.connor@xxxxxxxxxxxxxx>
> ---
> drivers/tty/serial/8250/8250_ni.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_ni.c b/drivers/tty/serial/8250/8250_ni.c
> index cb5b42b3609c..3f3dac694e20 100644
> --- a/drivers/tty/serial/8250/8250_ni.c
> +++ b/drivers/tty/serial/8250/8250_ni.c
> @@ -285,7 +285,7 @@ static int ni16550_probe(struct platform_device *pdev)
> bool rs232_property;
> int ret;
>
> - uart = kzalloc(sizeof(*uart), GFP_KERNEL);
> + uart = kzalloc_obj(*uart, GFP_KERNEL);

tty-next doesn't yet have the commit that defines kzalloc_obj so this
fails to build. Will have to wait until tty-next has kzalloc_obj.

> if (!uart)
> return -ENOMEM;

Regards,
Chaitanya