summarylogtreecommitdiffstats
path: root/pcm.patch
blob: a8438ac6835a0383668480bb76b6a90e107bebb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- sixfireusb-0.6.2/pcm.c	2020-01-18 18:14:41.964366166 +0100
+++ sixfireusb-0.6.2/pcm.c	2020-01-18 18:15:45.760966592 +0100
@@ -202,7 +202,6 @@
 {
 	struct pcm_runtime *rt = kzalloc(sizeof(struct pcm_runtime), GFP_KERNEL);
 	struct substream_runtime *sub_rt = chip->substream;
-	int ret;
 	int i;
 	
 	if (!rt)
@@ -216,16 +215,10 @@
 		sub_rt->devices[i]->private_data = chip;
 		snd_pcm_set_ops(sub_rt->devices[i], SNDRV_PCM_STREAM_PLAYBACK, &pcm_ops);
 		snd_pcm_set_ops(sub_rt->devices[i], SNDRV_PCM_STREAM_CAPTURE, &pcm_ops);
-		ret = snd_pcm_lib_preallocate_pages_for_all(sub_rt->devices[i],
+		snd_pcm_lib_preallocate_pages_for_all(sub_rt->devices[i],
 				SNDRV_DMA_TYPE_CONTINUOUS,
 				snd_dma_continuous_data(GFP_KERNEL),
 				MAX_BUFSIZE, MAX_BUFSIZE);
-		if (ret) {
-			kfree(rt);
-			snd_printk(KERN_ERR PREFIX
-					"error preallocating pcm buffers.\n");
-			return ret;
-		}
 	}
 
 	chip->pcm = rt;