Commit b37bb25
committed
audio: host: Add NULL check for local buffer retrieval
Add NULL pointer check after calling `comp_dev_get_first_data_consumer`
and `comp_dev_get_first_data_producer` functions in host_common_params.
These functions can return NULL if no appropriate buffer is found in the
component's connection list. Without this check, a NULL pointer would be
assigned to hd->local_buffer and could cause crashes in subsequent
operations that assume a valid buffer pointer.
The error handling returns -EINVAL and logs an appropriate error message
to help with debugging pipeline configuration issues.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent e23f9b1 commit b37bb25
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
906 | 911 | | |
907 | 912 | | |
908 | 913 | | |
| |||
0 commit comments