|
@@ -68,10 +68,13 @@ static int slave_update(struct link_slave *slave)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
uctl->id = slave->slave.id;
|
|
uctl->id = slave->slave.id;
|
|
err = slave->slave.get(&slave->slave, uctl);
|
|
err = slave->slave.get(&slave->slave, uctl);
|
|
|
|
+ if (err < 0)
|
|
|
|
+ goto error;
|
|
for (ch = 0; ch < slave->info.count; ch++)
|
|
for (ch = 0; ch < slave->info.count; ch++)
|
|
slave->vals[ch] = uctl->value.integer.value[ch];
|
|
slave->vals[ch] = uctl->value.integer.value[ch];
|
|
|
|
+ error:
|
|
kfree(uctl);
|
|
kfree(uctl);
|
|
- return 0;
|
|
|
|
|
|
+ return err < 0 ? err : 0;
|
|
}
|
|
}
|
|
|
|
|
|
/* get the slave ctl info and save the initial values */
|
|
/* get the slave ctl info and save the initial values */
|