Commit 892a925
8139cp: fix coherent mapping leak in error path.
cp_open
[...]
rc = cp_alloc_rings(cp);
if (rc)
return rc;
cp_alloc_rings
[...]
mem = dma_alloc_coherent(&cp->pdev->dev, CP_RING_BYTES,
&cp->ring_dma, GFP_KERNEL);
- cp_alloc_rings never frees the coherent mapping it allocates
- neither do cp_open when cp_alloc_rings fails
Signed-off-by: Francois Romieu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 64022d0 commit 892a925
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
| 1063 | + | |
1063 | 1064 | | |
| 1065 | + | |
1064 | 1066 | | |
1065 | | - | |
1066 | | - | |
| 1067 | + | |
1067 | 1068 | | |
1068 | 1069 | | |
1069 | 1070 | | |
1070 | 1071 | | |
1071 | 1072 | | |
1072 | 1073 | | |
1073 | | - | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1074 | 1079 | | |
1075 | 1080 | | |
1076 | 1081 | | |
| |||
0 commit comments