mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
gpib: hp_82341: Unify *allocate_private usage
Use the return value of hp_82341_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-17-dominik.karol.piatkowski@protonmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c0790b6c90
commit
3f5d831600
@@ -693,8 +693,9 @@ static int hp_82341_attach(struct gpib_board *board, const struct gpib_board_con
|
||||
int retval;
|
||||
|
||||
board->status = 0;
|
||||
if (hp_82341_allocate_private(board))
|
||||
return -ENOMEM;
|
||||
retval = hp_82341_allocate_private(board);
|
||||
if (retval)
|
||||
return retval;
|
||||
hp_priv = board->private_data;
|
||||
tms_priv = &hp_priv->tms9914_priv;
|
||||
tms_priv->read_byte = hp_82341_read_byte;
|
||||
|
||||
Reference in New Issue
Block a user