Skip to content

Commit 05d5d79

Browse files
committed
Revert "gpib: cb7210: Fix region leak when request_irq fails"
This reverts commit 2eae90a. Turns out not to be correct. Link: https://lore.kernel.org/r/PpNUbGhrvT8I_KayoDvQYI2PYjmMw1QEkuVBDZz2PwBsVVgPkBXJarc2mBM0IhiH3AQG0GtgqEsDRXNj3yUKEDBaZa25u73pAjvcE6vfRsg=@protonmail.com Reported-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Hongling Zeng <zhongling0719@126.com> Cc: Hongling Zeng <zenghongling@kylinos.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3677041 commit 05d5d79

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

drivers/gpib/cb7210/cb7210.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,7 @@ static int cb_isa_attach(struct gpib_board *board, const struct gpib_board_confi
10491049
if (!request_region(config->ibbase, cb7210_iosize, DRV_NAME)) {
10501050
dev_err(board->gpib_dev, "ioports starting at 0x%x are already in use\n",
10511051
config->ibbase);
1052-
retval = -EBUSY;
1053-
goto err_release_region;
1052+
return -EBUSY;
10541053
}
10551054
nec_priv->iobase = config->ibbase;
10561055
cb_priv->fifo_iobase = nec7210_iobase(cb_priv);
@@ -1063,16 +1062,11 @@ static int cb_isa_attach(struct gpib_board *board, const struct gpib_board_confi
10631062
// install interrupt handler
10641063
if (request_irq(config->ibirq, cb7210_interrupt, isr_flags, DRV_NAME, board)) {
10651064
dev_err(board->gpib_dev, "failed to obtain IRQ %d\n", config->ibirq);
1066-
retval = -EBUSY;
1067-
goto err_release_region;
1065+
return -EBUSY;
10681066
}
10691067
cb_priv->irq = config->ibirq;
10701068

10711069
return cb7210_init(cb_priv, board);
1072-
1073-
err_release_region:
1074-
release_region(nec7210_iobase(cb_priv), cb7210_iosize);
1075-
return retval;
10761070
}
10771071

10781072
static void cb_isa_detach(struct gpib_board *board)

0 commit comments

Comments
 (0)