forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/codecs/tda7419.c
....@@ -1,18 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * TDA7419 audio processor driver
34 *
45 * Copyright 2018 Konsulko Group
56 *
67 * Author: Matt Porter <mporter@konsulko.com>
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License
10
- * version 2 as published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful, but
13
- * WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * General Public License for more details.
168 */
179
1810 #include <linux/i2c.h>
....@@ -195,18 +187,13 @@
195187 int thresh = tvc->thresh;
196188 unsigned int invert = tvc->invert;
197189 int val;
198
- int ret;
199190
200
- ret = snd_soc_component_read(component, reg, &val);
201
- if (ret < 0)
202
- return ret;
191
+ val = snd_soc_component_read(component, reg);
203192 ucontrol->value.integer.value[0] =
204193 tda7419_vol_get_value(val, mask, min, thresh, invert);
205194
206195 if (tda7419_vol_is_stereo(tvc)) {
207
- ret = snd_soc_component_read(component, rreg, &val);
208
- if (ret < 0)
209
- return ret;
196
+ val = snd_soc_component_read(component, rreg);
210197 ucontrol->value.integer.value[1] =
211198 tda7419_vol_get_value(val, mask, min, thresh, invert);
212199 }