Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpib: tnt4882: Unify *allocate_private return value

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

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://patch.msgid.link/20260116174647.317256-27-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dominik Karol Piątkowski and committed by
Greg Kroah-Hartman
9effb865 a16ad9b6

+1 -1
+1 -1
drivers/gpib/tnt4882/tnt4882_gpib.c
··· 845 845 846 846 board->private_data = kzalloc(sizeof(struct tnt4882_priv), GFP_KERNEL); 847 847 if (!board->private_data) 848 - return -1; 848 + return -ENOMEM; 849 849 tnt_priv = board->private_data; 850 850 init_nec7210_private(&tnt_priv->nec7210_priv); 851 851 return 0;