mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
Revert "gpib: cb7210: Fix region leak when request_irq fails"
This reverts commit 2eae90a457.
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>
This commit is contained in:
parent
3677041715
commit
05d5d79440
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user