ALSA: Fix a Oops bug in omap soc driver.
authorStanley Miao <stanley.miao@windriver.com>
Fri, 19 Dec 2008 14:08:22 +0000 (22:08 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 Jan 2009 17:44:05 +0000 (09:44 -0800)
commit 19b3f31609dc8be3a56c78dcb7da723f10f7009c upstream.

There will be a Oops or frequent underrun messages when playing music with
omap soc driver, this is because a data region is incorretly sized, other data
region will be overwriten when writing to this data region.

Signed-off-by: Stanley Miao <stanley.miao@windriver.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/omap/omap-pcm.c

index 690bfea..5e023ba 100644 (file)
@@ -231,7 +231,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
        if (ret < 0)
                goto out;
 
-       prtd = kzalloc(sizeof(prtd), GFP_KERNEL);
+       prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
        if (prtd == NULL) {
                ret = -ENOMEM;
                goto out;