Skip to content

Conversation

kv2019i and others added 9 commits December 21, 2022 09:58
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after malloc.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit 4d64893)
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after calloc.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit 4bec5b2)
The create_dai() function can return an uninitialised value. Fix it
by reducing the scope of the variable.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
(cherry picked from commit aff99b2)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
If the main context variable is NULL, it cannot be used to print an
error message. Since this actually should never happen, use an
assertion similar to other similar cases in the file.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
(cherry picked from commit 10251c5)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This is a theoretical case of an invalid pipeline status, handle it
correctly.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
(cherry picked from commit 40e6c1d)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use a local variable in ipc4_get_buffer() to simplify it and remove
redundant code.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
(cherry picked from commit b516172)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In the lib_manager_dma_deinit() function proper checks
for dma_ext structure fields must be added to avoid
calling dma api with uninitialized parameters.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
(cherry picked from commit 4cc849d)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This patch adds initialization of module_size_ variable
in SystemAgent() creator.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
(cherry picked from commit 9091635)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
sof-logger -u 115200 -d /lib/firmware/sof-foo.ldc

Leads to silent failure as a NULL is passed to open(). Add
explicit error handling for this case.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit 80adcdf)
if (dma_ext->dma) {
dma_put(dma_ext->dma);
if (dma_ext->dma->z_dev)
dma_release_channel(dma_ext->dma->z_dev, dma_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is an ordering issue -- is dma_ext->dma even valid after dma_put? I missed this in the original commit I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think You are right. Thank you for catching this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, should be like on mtl-002
c4f38c2

Copy link
Collaborator

@paulstelian97 paulstelian97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See one inline comment for possible improvement.

@lgirdwood lgirdwood merged commit 2f37891 into thesofproject:stable-v2.4 Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants