From 59b0e56b8792db6f6d2252aba8bd226a8825faf2 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 22 Jun 2012 12:40:52 +0100 Subject: [PATCH] --- yaml --- r: 316263 b: refs/heads/master c: 9dfdd5abcf2b350d4fdb207c0dff3194e2fd73db h: refs/heads/master i: 316261: 1e3f678b01e83187fb47f214a1f934787558bd27 316259: 8e9870e125a84bee44b02f2c35353b9cc93dc77e 316255: 41c3b3f174fc6c9bb7fe02281a581bdc212c6010 v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-io.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2f00188bc4b8..1c2e095b2f99 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62d4a4b99dfd647ef88b8434334eaa7497602857 +refs/heads/master: 9dfdd5abcf2b350d4fdb207c0dff3194e2fd73db diff --git a/trunk/sound/soc/soc-io.c b/trunk/sound/soc/soc-io.c index 44d0174b4d97..29183ef2b93d 100644 --- a/trunk/sound/soc/soc-io.c +++ b/trunk/sound/soc/soc-io.c @@ -145,10 +145,13 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, if (!codec->control_data) codec->control_data = dev_get_regmap(codec->dev, NULL); - ret = regmap_get_val_bytes(codec->control_data); - /* Errors are legitimate for non-integer byte multiples */ - if (ret > 0) - codec->val_bytes = ret; + if (codec->control_data) { + ret = regmap_get_val_bytes(codec->control_data); + /* Errors are legitimate for non-integer byte + * multiples */ + if (ret > 0) + codec->val_bytes = ret; + } break; default: