| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * TDA7419 audio processor driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2018 Konsulko Group |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 16 | 8 | */ |
|---|
| 17 | 9 | |
|---|
| 18 | 10 | #include <linux/i2c.h> |
|---|
| .. | .. |
|---|
| 195 | 187 | int thresh = tvc->thresh; |
|---|
| 196 | 188 | unsigned int invert = tvc->invert; |
|---|
| 197 | 189 | int val; |
|---|
| 198 | | - int ret; |
|---|
| 199 | 190 | |
|---|
| 200 | | - ret = snd_soc_component_read(component, reg, &val); |
|---|
| 201 | | - if (ret < 0) |
|---|
| 202 | | - return ret; |
|---|
| 191 | + val = snd_soc_component_read(component, reg); |
|---|
| 203 | 192 | ucontrol->value.integer.value[0] = |
|---|
| 204 | 193 | tda7419_vol_get_value(val, mask, min, thresh, invert); |
|---|
| 205 | 194 | |
|---|
| 206 | 195 | 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); |
|---|
| 210 | 197 | ucontrol->value.integer.value[1] = |
|---|
| 211 | 198 | tda7419_vol_get_value(val, mask, min, thresh, invert); |
|---|
| 212 | 199 | } |
|---|