[PATCH v3 14/27] gpib: hp_82335: Unify *allocate_private return value

From: Dominik Karol Piątkowski

Date: Fri Jan 16 2026 - 12:48:36 EST


Return -ENOMEM instead of -1 in hp82335_allocate_private in case of
memory allocation failure.

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@xxxxxxxxxxxxxx>
---

v3:
- Split commit into smaller pieces
- Improve changelog

drivers/gpib/hp_82335/hp82335.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpib/hp_82335/hp82335.c b/drivers/gpib/hp_82335/hp82335.c
index d0e47ef77c87..6717fa437d31 100644
--- a/drivers/gpib/hp_82335/hp82335.c
+++ b/drivers/gpib/hp_82335/hp82335.c
@@ -212,7 +212,7 @@ static int hp82335_allocate_private(struct gpib_board *board)
{
board->private_data = kzalloc(sizeof(struct hp82335_priv), GFP_KERNEL);
if (!board->private_data)
- return -1;
+ return -ENOMEM;
return 0;
}

--
2.43.0