[Sound-open-firmware] [PATCH 1/4] pipeline: err might be used uninitialized in component_op_upstream()
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/audio/pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index e6bfda4..37e45f5 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -310,7 +310,7 @@ static int component_op_upstream(struct op_data *op_data, struct comp_dev *start, struct comp_dev *current, int op_start) { struct list_item *clist; - int err; + int err = 0;
trace_pipe("CO+"); trace_value(current->comp.id);
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/ipc/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ipc/ipc.c b/src/ipc/ipc.c index 947acdb..7c9193f 100644 --- a/src/ipc/ipc.c +++ b/src/ipc/ipc.c @@ -238,7 +238,7 @@ int ipc_pipe_connect(struct ipc *ipc,
/* check whether the components already exist */ icd_source = ipc_get_comp(ipc, connect->comp_source_id); - if (icd_source != NULL) { + if (icd_source == NULL) { trace_ipc_error("eCr"); trace_value(connect->comp_source_id); return EINVAL;
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/lib/schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/schedule.c b/src/lib/schedule.c index 5611c8e..a063d04 100644 --- a/src/lib/schedule.c +++ b/src/lib/schedule.c @@ -206,7 +206,7 @@ int scheduler_init(struct reef *reef) { trace_pipe("ScI");
- sch = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*sch)); + sch = rzalloc(RZONE_SYS, RFLAGS_NONE, sizeof(*sch)); list_init(&sch->list); spinlock_init(&sch->lock); sch->clock = PLATFORM_SCHED_CLOCK;
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/ipc/intel-ipc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index 0fd9b0c..57922cc 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -468,23 +468,24 @@ static uint32_t ipc_comp_set_value(uint32_t header, uint32_t cmd) static uint32_t ipc_comp_get_value(uint32_t header, uint32_t cmd) { struct ipc_comp_dev *stream_dev; - struct sof_ipc_ctrl_values values; + struct sof_ipc_ctrl_values *values = _ipc->comp_data; int ret;
trace_ipc("VoG");
+ /* get the component */ - stream_dev = ipc_get_comp(_ipc, values.comp_id); + stream_dev = ipc_get_comp(_ipc, values->comp_id); if (stream_dev == NULL) return -ENODEV; /* get component values */ - ret = comp_cmd(stream_dev->cd, COMP_CMD_VOLUME, &values); + ret = comp_cmd(stream_dev->cd, COMP_CMD_VOLUME, values); if (ret < 0) return ret;
/* write component values to the outbox */ - mailbox_outbox_write(&values, 0, sizeof(values)); + mailbox_outbox_write(values, 0, sizeof(*values));
return 0; }
participants (1)
-
Liam Girdwood