]> err.no Git - linux-2.6/blobdiff - sound/oss/awe_wave.c
[PATCH] drivers/net/hamradio/dmascc.c: fix section mismatch
[linux-2.6] / sound / oss / awe_wave.c
index b3ea719d33db0b737a6fb64c5d7d311b14014f99..d1a0eb294d6f64c2b45aac340fb05ae0ba913429 100644 (file)
@@ -2944,7 +2944,7 @@ alloc_new_info(void)
 {
        awe_voice_list *newlist;
        
-       newlist = (awe_voice_list *)kmalloc(sizeof(*newlist), GFP_KERNEL);
+       newlist = kmalloc(sizeof(*newlist), GFP_KERNEL);
        if (newlist == NULL) {
                printk(KERN_ERR "AWE32: can't alloc info table\n");
                return NULL;
@@ -3547,8 +3547,10 @@ awe_load_guspatch(const char __user *addr, int offs, int size, int pmgr_flag)
        smp->checksum_flag = 0;
        smp->checksum = 0;
 
-       if ((rc = awe_write_wave_data(addr, sizeof_patch, smprec, -1)) < 0)
+       if ((rc = awe_write_wave_data(addr, sizeof_patch, smprec, -1)) < 0) {
+               kfree(vrec);
                return rc;
+       }
        sf->mem_ptr += rc;
        add_sf_sample(sf, smprec);