aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-11-04 11:13:15 +0100
committerLars-Peter Clausen <lars@metafoo.de>2009-11-04 11:13:15 +0100
commit811d500d14db87326311d20868d3d593b6296a28 (patch)
tree6d98745feed687bf0287e20654fb0d81113c32ff
parentbbda94845c28b7b2c6c207d168f2d5782807ad03 (diff)
neo1973_wm8753: Sanity check: Don't try to write registers if amp i2c device is
not registered.
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 7f28af2058e..262db4651b4 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -50,6 +50,9 @@ static struct lm4857 {
static void lm4857_write_regs(void)
{
+ if (!lm4857.i2c)
+ return;
+
if (i2c_master_send(lm4857.i2c, lm4857.regs, 4) != 4)
printk(KERN_ERR "lm4857: i2c write failed\n");
}