aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/stradis.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c
index 54fc33011ffb..9d769264a329 100644
--- a/drivers/media/video/stradis.c
+++ b/drivers/media/video/stradis.c
@@ -2012,7 +2012,6 @@ static int __devinit init_saa7146(struct pci_dev *pdev)
2012{ 2012{
2013 struct saa7146 *saa = pci_get_drvdata(pdev); 2013 struct saa7146 *saa = pci_get_drvdata(pdev);
2014 2014
2015 memset(saa, 0, sizeof(*saa));
2016 saa->user = 0; 2015 saa->user = 0;
2017 /* reset the saa7146 */ 2016 /* reset the saa7146 */
2018 saawrite(0xffff0000, SAA7146_MC1); 2017 saawrite(0xffff0000, SAA7146_MC1);
@@ -2062,16 +2061,16 @@ static int __devinit init_saa7146(struct pci_dev *pdev)
2062 } 2061 }
2063 if (saa->audbuf == NULL && (saa->audbuf = vmalloc(65536)) == NULL) { 2062 if (saa->audbuf == NULL && (saa->audbuf = vmalloc(65536)) == NULL) {
2064 dev_err(&pdev->dev, "%d: malloc failed\n", saa->nr); 2063 dev_err(&pdev->dev, "%d: malloc failed\n", saa->nr);
2065 goto errvid; 2064 goto errfree;
2066 } 2065 }
2067 if (saa->osdbuf == NULL && (saa->osdbuf = vmalloc(131072)) == NULL) { 2066 if (saa->osdbuf == NULL && (saa->osdbuf = vmalloc(131072)) == NULL) {
2068 dev_err(&pdev->dev, "%d: malloc failed\n", saa->nr); 2067 dev_err(&pdev->dev, "%d: malloc failed\n", saa->nr);
2069 goto erraud; 2068 goto errfree;
2070 } 2069 }
2071 /* allocate 81920 byte buffer for clipping */ 2070 /* allocate 81920 byte buffer for clipping */
2072 if ((saa->dmavid2 = kzalloc(VIDEO_CLIPMAP_SIZE, GFP_KERNEL)) == NULL) { 2071 if ((saa->dmavid2 = kzalloc(VIDEO_CLIPMAP_SIZE, GFP_KERNEL)) == NULL) {
2073 dev_err(&pdev->dev, "%d: clip kmalloc failed\n", saa->nr); 2072 dev_err(&pdev->dev, "%d: clip kmalloc failed\n", saa->nr);
2074 goto errosd; 2073 goto errfree;
2075 } 2074 }
2076 /* setup clipping registers */ 2075 /* setup clipping registers */
2077 saawrite(virt_to_bus(saa->dmavid2), SAA7146_BASE_EVEN2); 2076 saawrite(virt_to_bus(saa->dmavid2), SAA7146_BASE_EVEN2);
@@ -2085,15 +2084,11 @@ static int __devinit init_saa7146(struct pci_dev *pdev)
2085 I2CBusScan(saa); 2084 I2CBusScan(saa);
2086 2085
2087 return 0; 2086 return 0;
2088errosd: 2087errfree:
2089 vfree(saa->osdbuf); 2088 vfree(saa->osdbuf);
2090 saa->osdbuf = NULL;
2091erraud:
2092 vfree(saa->audbuf); 2089 vfree(saa->audbuf);
2093 saa->audbuf = NULL;
2094errvid:
2095 vfree(saa->vidbuf); 2090 vfree(saa->vidbuf);
2096 saa->vidbuf = NULL; 2091 saa->audbuf = saa->osdbuf = saa->vidbuf = NULL;
2097err: 2092err:
2098 return -ENOMEM; 2093 return -ENOMEM;
2099} 2094}