Title: [9014] trunk/sound/soc/codecs/ad183x.c: fix small use before NULL checking bug
Revision
9014
Author
lliubbo
Date
2010-07-26 07:08:27 -0400 (Mon, 26 Jul 2010)

Log Message

fix small use before NULL checking bug

Modified Paths


Diff

Modified: trunk/sound/soc/codecs/ad183x.c (9013 => 9014)


--- trunk/sound/soc/codecs/ad183x.c	2010-07-26 11:05:48 UTC (rev 9013)
+++ trunk/sound/soc/codecs/ad183x.c	2010-07-26 11:08:27 UTC (rev 9014)
@@ -495,8 +495,8 @@
 {
 	struct snd_soc_device *socdev = platform_get_drvdata(pdev);
 	struct snd_soc_codec *codec;
-	struct ad183x_priv *ad183x = ad183x_codec->private_data;
-	struct ad183x_chl_ctrls *chl_ctrl = &ad183x->chl_ctrl;
+	struct ad183x_priv *ad183x;
+	struct ad183x_chl_ctrls *chl_ctrl;
 	int ret = 0;
 
 	if (ad183x_codec == NULL) {
@@ -504,6 +504,8 @@
 		return -ENODEV;
 	}
 
+	ad183x = ad183x_codec->private_data;
+	chl_ctrl = &ad183x->chl_ctrl;
 	socdev->card->codec = ad183x_codec;
 	codec = ad183x_codec;
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to