From 811d500d14db87326311d20868d3d593b6296a28 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 4 Nov 2009 11:13:15 +0100 Subject: neo1973_wm8753: Sanity check: Don't try to write registers if amp i2c device is not registered. --- sound/soc/s3c24xx/neo1973_wm8753.c | 3 +++ 1 file changed, 3 insertions(+) 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"); } -- cgit v1.2.3