public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: 8250_ni: use kzalloc_obj() for allocation
@ 2026-02-17  3:19 Pete Connor
  2026-02-17 21:48 ` Chaitanya Vadrevu
  2026-03-12 13:44 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Pete Connor @ 2026-02-17  3:19 UTC (permalink / raw)
  To: Chaitanya Vadrevu, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel
  Cc: Pete Connor

  Replace kzalloc() with the preferred kzalloc_obj() helper
  to address a checkpatch warning.

  Signed-off-by: Pete Connor <pete.connor@pythcoiner.dev>
---
 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);
 	if (!uart)
 		return -ENOMEM;
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-12 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17  3:19 [PATCH] serial: 8250_ni: use kzalloc_obj() for allocation Pete Connor
2026-02-17 21:48 ` Chaitanya Vadrevu
2026-03-12 13:44 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox