sound: OSS: mpu401, fix deadlock

mpu401_chk_version is called with a spin lock already held. Don't take it
again.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Jiri Slaby and committed by Takashi Iwai 9ea5ca75 580c9d37

+3 -13
+3 -13
sound/oss/mpu401.c
··· 926 static void mpu401_chk_version(int n, struct mpu_config *devc) 927 { 928 int tmp; 929 - unsigned long flags; 930 931 devc->version = devc->revision = 0; 932 933 - spin_lock_irqsave(&devc->lock,flags); 934 - if ((tmp = mpu_cmd(n, 0xAC, 0)) < 0) 935 - { 936 - spin_unlock_irqrestore(&devc->lock,flags); 937 return; 938 - } 939 if ((tmp & 0xf0) > 0x20) /* Why it's larger than 2.x ??? */ 940 - { 941 - spin_unlock_irqrestore(&devc->lock,flags); 942 return; 943 - } 944 devc->version = tmp; 945 946 - if ((tmp = mpu_cmd(n, 0xAD, 0)) < 0) 947 - { 948 devc->version = 0; 949 - spin_unlock_irqrestore(&devc->lock,flags); 950 return; 951 } 952 devc->revision = tmp; 953 - spin_unlock_irqrestore(&devc->lock,flags); 954 } 955 956 int attach_mpu401(struct address_info *hw_config, struct module *owner)
··· 926 static void mpu401_chk_version(int n, struct mpu_config *devc) 927 { 928 int tmp; 929 930 devc->version = devc->revision = 0; 931 932 + tmp = mpu_cmd(n, 0xAC, 0); 933 + if (tmp < 0) 934 return; 935 if ((tmp & 0xf0) > 0x20) /* Why it's larger than 2.x ??? */ 936 return; 937 devc->version = tmp; 938 939 + if ((tmp = mpu_cmd(n, 0xAD, 0)) < 0) { 940 devc->version = 0; 941 return; 942 } 943 devc->revision = tmp; 944 } 945 946 int attach_mpu401(struct address_info *hw_config, struct module *owner)