diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2009-11-04 11:13:15 +0100 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2009-12-06 09:22:36 +0100 |
commit | 9489a6388658bb95634ad46a5d5647128b32b3f2 (patch) | |
tree | e76d971f194dca20f89899331d2214ee04ed2674 /sound/soc | |
parent | 7966967cbec5492680dd4ecd568678bd820a7963 (diff) |
neo1973_wm8753: Sanity check: Don't try to write registers if amp i2c device is
not registered.
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/s3c24xx/neo1973_wm8753.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index c02666db804..5cc1ef2c8fe 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"); } |