aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/vmaster.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c
index 8632301489fa..b67de2bb06a2 100644
--- a/sound/core/vmaster.c
+++ b/sound/core/vmaster.c
@@ -68,10 +68,13 @@ static int slave_update(struct link_slave *slave)
68 return -ENOMEM; 68 return -ENOMEM;
69 uctl->id = slave->slave.id; 69 uctl->id = slave->slave.id;
70 err = slave->slave.get(&slave->slave, uctl); 70 err = slave->slave.get(&slave->slave, uctl);
71 if (err < 0)
72 goto error;
71 for (ch = 0; ch < slave->info.count; ch++) 73 for (ch = 0; ch < slave->info.count; ch++)
72 slave->vals[ch] = uctl->value.integer.value[ch]; 74 slave->vals[ch] = uctl->value.integer.value[ch];
75 error:
73 kfree(uctl); 76 kfree(uctl);
74 return 0; 77 return err < 0 ? err : 0;
75} 78}
76 79
77/* get the slave ctl info and save the initial values */ 80/* get the slave ctl info and save the initial values */