OpenCloudOS-Kernel/sound/core
Mariusz Kozlowski 2469049e72 [ALSA] sound: snd_register_device_for_dev fix
snd_register_device_for_dev() can oops when device_create() returns
ERR_PTR(err).
Scenario:
preg->dev = device_create(...); /* fails */
if (preg->dev) /* contains ERR_PTR(err) */
	dev_set_drvdata(preg->dev, private_data);
and dev_set_drvdata() looks like this:
static inline void
dev_set_drvdata (struct device *dev, void *data)
{
	dev->driver_data = data; <--- boom
}
This patch should prevent that.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:51:06 +02:00
..
oss [ALSA] Add new AFMT_* formats for OSS emulation 2007-10-16 15:58:33 +02:00
seq [ALSA] schedule_timeout() fix for core/seq/seq_instr.c 2007-10-16 16:50:55 +02:00
Kconfig misc doc and kconfig typos 2007-05-09 08:58:15 +02:00
Makefile [ALSA] Clean up Makefile 2007-10-16 15:58:05 +02:00
control.c [ALSA] unexport snd_ctl_elem_{read,write} 2007-10-16 16:49:19 +02:00
control_compat.c [ALSA] alsa core: convert to list_for_each_entry* 2007-02-09 09:00:10 +01:00
device.c [ALSA] alsa core: convert to list_for_each_entry* 2007-02-09 09:00:10 +01:00
hwdep.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
hwdep_compat.c [PATCH] hwdep_compat missed __user annotations 2006-10-10 15:37:21 -07:00
info.c [PATCH] mark struct file_operations const 9 2007-02-12 09:48:46 -08:00
info_oss.c [PATCH] namespaces: utsname: use init_utsname when appropriate 2006-10-02 07:57:21 -07:00
init.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
isadma.c [ALSA] Clean up EXPORT_SYMBOL()s in snd module 2006-06-22 21:32:52 +02:00
memalloc.c [ALSA] Fix build error without CONFIG_HAS_DMA 2007-10-16 15:58:05 +02:00
memory.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
misc.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
pcm.c [PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED 2007-02-09 16:25:48 +01:00
pcm_compat.c [ALSA] Fix control/status mmap with shared PCM substream 2006-09-23 10:39:50 +02:00
pcm_lib.c [ALSA] Fix possible invalid memory access in PCM core 2007-02-09 09:03:31 +01:00
pcm_memory.c [ALSA] pcm core: add prealloc_max file to substream directory to show maximum DMA size 2007-02-09 09:00:13 +01:00
pcm_misc.c [ALSA] pcm: add snd_pcm_rate_to_rate_bit() helper 2007-10-16 15:58:54 +02:00
pcm_native.c [ALSA] pcm: merge rates[] from pcm_misc.c and pcm_native.c 2007-10-16 15:58:53 +02:00
pcm_timer.c [ALSA] Remove xxx_t typedefs: PCM 2006-01-03 12:17:43 +01:00
rawmidi.c [ALSA] Clean up duplicate includes in sound/core/ 2007-10-16 15:03:19 +02:00
rawmidi_compat.c [ALSA] Remove xxx_t typedefs: Raw MIDI 2006-01-03 12:17:35 +01:00
rtctimer.c [ALSA] is_power_of_2 in rtctimer.c 2007-05-11 16:55:42 +02:00
sgbuf.c [ALSA] use the ALIGN macro 2006-12-20 08:55:36 +01:00
sound.c [ALSA] sound: snd_register_device_for_dev fix 2007-10-16 16:51:06 +02:00
sound_oss.c [PATCH] ALSA: Fix sysfs breakage 2007-01-29 14:32:53 -08:00
timer.c [ALSA] timer: check for incorrect device state in non-debug compiles, too 2007-07-20 11:11:54 +02:00
timer_compat.c [ALSA] Remove xxx_t typedefs: Timer 2006-01-03 12:17:34 +01:00