diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-05-30 12:25:36 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-05-30 12:25:36 +0200 |
| commit | 05d5d79440c2cc0784f91b61f2012753e66be472 (patch) | |
| tree | 5dd739fd70746f2806be734a5cc6ecbeac388ac1 /drivers | |
| parent | 36770417153644bc88281c7284730ef1d14d8d3c (diff) | |
| download | linux-next-05d5d79440c2cc0784f91b61f2012753e66be472.tar.gz linux-next-05d5d79440c2cc0784f91b61f2012753e66be472.zip | |
Revert "gpib: cb7210: Fix region leak when request_irq fails"
This reverts commit 2eae90a457baa0048a96ed38ad93090ee38c8b2f.
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpib/cb7210/cb7210.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpib/cb7210/cb7210.c b/drivers/gpib/cb7210/cb7210.c index 673b5bfe2e7d..6dd8637c5964 100644 --- a/drivers/gpib/cb7210/cb7210.c +++ b/drivers/gpib/cb7210/cb7210.c @@ -1049,8 +1049,7 @@ static int cb_isa_attach(struct gpib_board *board, const struct gpib_board_confi if (!request_region(config->ibbase, cb7210_iosize, DRV_NAME)) { dev_err(board->gpib_dev, "ioports starting at 0x%x are already in use\n", config->ibbase); - retval = -EBUSY; - goto err_release_region; + return -EBUSY; } nec_priv->iobase = config->ibbase; 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 // install interrupt handler if (request_irq(config->ibirq, cb7210_interrupt, isr_flags, DRV_NAME, board)) { dev_err(board->gpib_dev, "failed to obtain IRQ %d\n", config->ibirq); - retval = -EBUSY; - goto err_release_region; + return -EBUSY; } cb_priv->irq = config->ibirq; return cb7210_init(cb_priv, board); - -err_release_region: - release_region(nec7210_iobase(cb_priv), cb7210_iosize); - return retval; } static void cb_isa_detach(struct gpib_board *board) |
