-
Notifications
You must be signed in to change notification settings - Fork 349
[SOF2.4] Backport fixes PR6839, PR6844, PR6846, PR6847 and PR6859 #6866
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
[SOF2.4] Backport fixes PR6839, PR6844, PR6846, PR6847 and PR6859 #6866
Conversation
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
paulstelian97
left a comment
There was a problem hiding this 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.
Backport following fixes to 2.4: