Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio/host: questionable error handling (Coverity) #534

Closed
plbossart opened this issue Nov 2, 2018 · 1 comment
Closed

audio/host: questionable error handling (Coverity) #534

plbossart opened this issue Nov 2, 2018 · 1 comment
Assignees
Labels
P2 Critical bugs or normal features

Comments

@plbossart
Copy link
Member

static int host_trigger(struct comp_dev *dev, int cmd)
273{
274 struct host_data *hd = comp_get_drvdata(dev);
275 int ret = 0;
276
277 trace_host("trg");
278
279 ret = comp_set_state(dev, cmd);
280 if (ret < 0)
281 goto out;
282
283 switch (cmd) {
284 case COMP_TRIGGER_STOP:

CID 324978 (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from host_stop(dev) to ret here, but that stored value is overwritten before it can be used.
285 ret = host_stop(dev);
286 /* fall through /
287 case COMP_TRIGGER_XRUN:
288/
TODO: add attribute to dma interface and do run-time if() here */
289#if defined CONFIG_DMA_GW
value_overwrite: Overwriting previous write to ret with value from dma_stop(hd->dma, hd->chan).
290 ret = dma_stop(hd->dma, hd->chan);
291#endif

@plbossart plbossart added the P2 Critical bugs or normal features label Nov 2, 2018
@libinyang
Copy link
Contributor

The patch #566 tries to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Critical bugs or normal features
Projects
None yet
Development

No branches or pull requests

3 participants