]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpib: agilent_82350b: Unify *allocate_private usage
authorDominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Fri, 16 Jan 2026 17:47:30 +0000 (17:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2026 15:04:06 +0000 (16:04 +0100)
Use the return value of agilent_82350b_allocate_private in calling code
as early return value in case of error.

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

index 01a5bb43cd2d3e420555db160737b952dd3fc716..d55d097aa6f03df206cb87fd6ea9ea84ebf88074 100644 (file)
@@ -599,8 +599,9 @@ static int agilent_82350b_generic_attach(struct gpib_board *board,
 
        board->status = 0;
 
-       if (agilent_82350b_allocate_private(board))
-               return -ENOMEM;
+       retval = agilent_82350b_allocate_private(board);
+       if (retval)
+               return retval;
        a_priv = board->private_data;
        a_priv->using_fifos = use_fifos;
        tms_priv = &a_priv->tms9914_priv;