Skip to contentSkip to conversation

sound/soc: davinci: check kzalloc() result (typo)

PATCH Applied Kulikov Vasiliy 3 participants 3 messages Jul 16, 2010 – Jul 17, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 13/15 sound/soc: davinci: check kzalloc() result (typo)

The code checks 'davinci_vc' after kzalloc() and do not checks 'davinci_vcif_dev' that kzalloc() result is assigned to. It seems that it is a typo (autocompletion?).

---
 sound/soc/davinci/davinci-vcif.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/davinci/davinci-vcif.c +1 -1
index 9aa980d..4867853 100644
@@ -203,7 +203,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
 	int ret;
 
 	davinci_vcif_dev = kzalloc(sizeof(struct davinci_vcif_dev), GFP_KERNEL);
-	if (!davinci_vc) {
+	if (!davinci_vcif_dev) {
 		dev_dbg(&pdev->dev,
 			"could not allocate memory for private data\n");
 		return -ENOMEM;
Signature · 1 line
1.7.0.4
Acked-by on v1 13/15
#1 lore raw
Quoted 14 lines · Kulikov Vasiliy

The code checks 'davinci_vc' after kzalloc() and do not checks 'davinci_vcif_dev' that kzalloc() result is assigned to. It seems that it is a typo (autocompletion?).

---
 sound/soc/davinci/davinci-vcif.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/davinci/davinci-vcif.c +0 -0
index 9aa980d..4867853 100644

sound/soc/davinci/davinci-vcif.c static int davinci_vcif_probe(struct platform_device *pdev) · line 209

Quoted 8 lines
sound/soc/davinci/davinci-vcif.c +1 -1
@@ -203,7 +203,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
 	int ret;
 
 	davinci_vcif_dev = kzalloc(sizeof(struct davinci_vcif_dev), GFP_KERNEL);
-	if (!davinci_vc) {
+	if (!davinci_vcif_dev) {
 		dev_dbg(&pdev->dev,
 			"could not allocate memory for private data\n");
 		return -ENOMEM;

13,14 & 15

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
Applied
#2 lore raw
Quoted 8 lines · Liam Girdwood
Quoted 5 lines · Kulikov Vasiliy

The code checks 'davinci_vc' after kzalloc() and do not checks 'davinci_vcif_dev' that kzalloc() result is assigned to. It seems that it is a typo (autocompletion?).

Applied, thanks. Kulikov could you please check the subject lines you're using for your patches - try to be consistent with the rest of the patches for the same code area.