• Jon Masters's avatar
    [PATCH] sound: fix hang in mpu401_uart.c · 962f831f
    Jon Masters authored
    This fixes a hang in mpu401_uart.c that can occur when the mpu401 interface
    is non-existent or otherwise doesn't respond to commands but we issue IO
    anyway.  snd_mpu401_uart_cmd now returns an error code that is passed up
    the stack so that an open() will fail immediately in such cases.
    
    Eventually discovered after wine/cxoffice would constantly cause hard
    lockups on my desktop immediately after loading (emulating Windows too
    well).  Turned out that I'd recently moved my sound cards around and using
    /dev/sequencer now talks to a sound card with a broken MPU.
    
    This second version changes -EFAULT to -EIO and frees open resources on
    error too.  Test booted and seems to work ok.
    Signed-off-by: default avatarJon Masters <jcm@jonmasters.org>
    Cc: Jaroslav Kysela <perex@suse.cz>
    Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    962f831f
mpu401_uart.c 15 KB