diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-10 10:23:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-10 10:23:45 -0400 |
| commit | 3657423c02b639fcade37673f8541bd90c5e58e5 (patch) | |
| tree | 748e7f7114c9014b3bee138519872ac978f7320a /sound/core | |
| parent | df423dc7f2a801b9a45d7c501a8eb5c529455ea1 (diff) | |
| parent | 5431427b1a5acbae0b3dffd91f6ba96aee141f43 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: rawmidi: fix the get next midi device ioctl
ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config()
ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()
ALSA: msnd-classic: Fix invalid cfg parameter
ALSA: hda - Enable PC-beep for EeePC with ALC269 codec
ALSA: hda - Add errata initverb sequence for CS42xx codecs
ALSA: usb - Release capture substream URBs properly
ALSA: virtuoso: fix setting of Xonar DS line-in/mic-in controls
ALSA: virtuoso: work around missing reset in the Xonar DS Windows driver
ALSA: hda - Add quirk for Lenovo T400s
ALSA: usb-audio: fix detection of vendor-specific device protocol settings
ALSA: usb-audio: Assume first control interface is for audio
ALSA: hda - Add a new hp-laptop model for Conexant 5066, tested on HP G60
Diffstat (limited to 'sound/core')
| -rw-r--r-- | sound/core/rawmidi.c | 2 | ||||
| -rw-r--r-- | sound/core/seq/oss/seq_oss_init.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index eb68326c37d4..a7868ad4d530 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c | |||
| @@ -829,6 +829,8 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card, | |||
| 829 | 829 | ||
| 830 | if (get_user(device, (int __user *)argp)) | 830 | if (get_user(device, (int __user *)argp)) |
| 831 | return -EFAULT; | 831 | return -EFAULT; |
| 832 | if (device >= SNDRV_RAWMIDI_DEVICES) /* next device is -1 */ | ||
| 833 | device = SNDRV_RAWMIDI_DEVICES - 1; | ||
| 832 | mutex_lock(®ister_mutex); | 834 | mutex_lock(®ister_mutex); |
| 833 | device = device < 0 ? 0 : device + 1; | 835 | device = device < 0 ? 0 : device + 1; |
| 834 | while (device < SNDRV_RAWMIDI_DEVICES) { | 836 | while (device < SNDRV_RAWMIDI_DEVICES) { |
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index 685712276ac9..69cd7b3c362d 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c | |||
| @@ -281,13 +281,10 @@ snd_seq_oss_open(struct file *file, int level) | |||
| 281 | return 0; | 281 | return 0; |
| 282 | 282 | ||
| 283 | _error: | 283 | _error: |
| 284 | snd_seq_oss_writeq_delete(dp->writeq); | ||
| 285 | snd_seq_oss_readq_delete(dp->readq); | ||
| 286 | snd_seq_oss_synth_cleanup(dp); | 284 | snd_seq_oss_synth_cleanup(dp); |
| 287 | snd_seq_oss_midi_cleanup(dp); | 285 | snd_seq_oss_midi_cleanup(dp); |
| 288 | delete_port(dp); | ||
| 289 | delete_seq_queue(dp->queue); | 286 | delete_seq_queue(dp->queue); |
| 290 | kfree(dp); | 287 | delete_port(dp); |
| 291 | 288 | ||
| 292 | return rc; | 289 | return rc; |
| 293 | } | 290 | } |
| @@ -350,8 +347,10 @@ create_port(struct seq_oss_devinfo *dp) | |||
| 350 | static int | 347 | static int |
| 351 | delete_port(struct seq_oss_devinfo *dp) | 348 | delete_port(struct seq_oss_devinfo *dp) |
| 352 | { | 349 | { |
| 353 | if (dp->port < 0) | 350 | if (dp->port < 0) { |
| 351 | kfree(dp); | ||
| 354 | return 0; | 352 | return 0; |
| 353 | } | ||
| 355 | 354 | ||
| 356 | debug_printk(("delete_port %i\n", dp->port)); | 355 | debug_printk(("delete_port %i\n", dp->port)); |
| 357 | return snd_seq_event_port_detach(dp->cseq, dp->port); | 356 | return snd_seq_event_port_detach(dp->cseq, dp->port); |
