From 1eaba3f28303dc55aeeaaef4b95cbf70ed857871 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Fri, 27 Aug 2004 05:13:07 -0700 Subject: [PATCH] [PATCH] wf_midi check_region() removal Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- sound/oss/wf_midi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/oss/wf_midi.c b/sound/oss/wf_midi.c index 379e70f2c9f85..3ced960e53d48 100644 --- a/sound/oss/wf_midi.c +++ b/sound/oss/wf_midi.c @@ -784,7 +784,7 @@ virtual_midi_disable (void) int __init detect_wf_mpu (int irq, int io_base) { - if (check_region (io_base, 2)) { + if (!request_region(io_base, 2, "wavefront midi")) { printk (KERN_WARNING "WF-MPU: I/O port %x already in use.\n", io_base); return -1; @@ -803,11 +803,10 @@ int __init install_wf_mpu (void) if ((phys_dev->devno = sound_alloc_mididev()) < 0){ printk (KERN_ERR "WF-MPU: Too many MIDI devices detected.\n"); + release_region(phys_dev->base, 2); return -1; - } - request_region (phys_dev->base, 2, "wavefront midi"); phys_dev->isvirtual = 0; if (config_wf_mpu (phys_dev)) { -- 2.53.0