diff options
Diffstat (limited to 'sound/soc/soc-io.c')
-rw-r--r-- | sound/soc/soc-io.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 260efc8466fc..6480e8f29310 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c | |||
@@ -60,14 +60,11 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | |||
60 | { | 60 | { |
61 | int ret; | 61 | int ret; |
62 | 62 | ||
63 | /* Device has made its own regmap arrangements */ | ||
64 | if (!regmap) | 63 | if (!regmap) |
65 | codec->control_data = dev_get_regmap(codec->dev, NULL); | 64 | return -EINVAL; |
66 | else | ||
67 | codec->control_data = regmap; | ||
68 | 65 | ||
69 | if (IS_ERR(codec->control_data)) | 66 | /* Device has made its own regmap arrangements */ |
70 | return PTR_ERR(codec->control_data); | 67 | codec->control_data = regmap; |
71 | 68 | ||
72 | codec->write = hw_write; | 69 | codec->write = hw_write; |
73 | codec->read = hw_read; | 70 | codec->read = hw_read; |