mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
sound: tegra-safety-audio: Fix CERT C issues
Fix the following CIDs: CID 689175 CID 689167 CID 689171 Bug 3959323 Change-Id: I86ebee06eb0f06f8f8424fc62b94a079b8e9fe80 Signed-off-by: pmedawala <pmedawala@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3006590 Reviewed-by: Uday Gupta <udayg@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
325bd67f86
commit
4403c71b96
@@ -98,7 +98,7 @@ static int alwayson_control_put(struct snd_kcontrol *kctl,
|
|||||||
struct snd_ctl_elem_value *uc)
|
struct snd_ctl_elem_value *uc)
|
||||||
{
|
{
|
||||||
int rx = (int)kctl->private_value & 1;
|
int rx = (int)kctl->private_value & 1;
|
||||||
int id = (int)kctl->private_value >> 1;
|
uint32_t id = (uint32_t)kctl->private_value >> 1;
|
||||||
int enable = uc->value.integer.value[0];
|
int enable = uc->value.integer.value[0];
|
||||||
struct i2s_config *i2s_config = &i2s[id].config;
|
struct i2s_config *i2s_config = &i2s[id].config;
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ static int alwayson_control_get(struct snd_kcontrol *kctl,
|
|||||||
struct snd_ctl_elem_value *uc)
|
struct snd_ctl_elem_value *uc)
|
||||||
{
|
{
|
||||||
int rx = (int)kctl->private_value & 1;
|
int rx = (int)kctl->private_value & 1;
|
||||||
int id = (int)kctl->private_value >> 1;
|
uint32_t id = (uint32_t)kctl->private_value >> 1;
|
||||||
struct i2s_config *i2s_config = &i2s[id].config;
|
struct i2s_config *i2s_config = &i2s[id].config;
|
||||||
|
|
||||||
if (rx)
|
if (rx)
|
||||||
@@ -208,7 +208,7 @@ static const struct snd_kcontrol_new controls_i2s8[] = {
|
|||||||
|
|
||||||
static int safety_i2s_add_kcontrols(struct snd_card *card, int id)
|
static int safety_i2s_add_kcontrols(struct snd_card *card, int id)
|
||||||
{
|
{
|
||||||
int num_of_controls, i, ret;
|
int num_of_controls, i = 0, ret = 0;
|
||||||
|
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
num_of_controls = ARRAY_SIZE(controls_i2s7);
|
num_of_controls = ARRAY_SIZE(controls_i2s7);
|
||||||
|
|||||||
Reference in New Issue
Block a user