From 9effb86530ee61fe953a8a5d2c052fdc01c5d755 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dominik=20Karol=20Pi=C4=85tkowski?= Date: Fri, 16 Jan 2026 17:49:19 +0000 Subject: [PATCH] gpib: tnt4882: Unify *allocate_private return value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Return -ENOMEM instead of -1 in tnt4882_allocate_private in case of memory allocation failure. Signed-off-by: Dominik Karol Piątkowski Link: https://patch.msgid.link/20260116174647.317256-27-dominik.karol.piatkowski@protonmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpib/tnt4882/tnt4882_gpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpib/tnt4882/tnt4882_gpib.c b/drivers/gpib/tnt4882/tnt4882_gpib.c index 5f8d7547dadb..7b9cfb6c07ad 100644 --- a/drivers/gpib/tnt4882/tnt4882_gpib.c +++ b/drivers/gpib/tnt4882/tnt4882_gpib.c @@ -845,7 +845,7 @@ static int tnt4882_allocate_private(struct gpib_board *board) board->private_data = kzalloc(sizeof(struct tnt4882_priv), GFP_KERNEL); if (!board->private_data) - return -1; + return -ENOMEM; tnt_priv = board->private_data; init_nec7210_private(&tnt_priv->nec7210_priv); return 0; -- 2.47.3