aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOfer Heifetz <oferh@marvell.com>2022-06-29 20:18:27 +0300
committerOfer Heifetz <oferh@marvell.com>2022-06-29 20:21:27 +0300
commitffa7bac6f5c01aa1dc72a58b76f02882db341c20 (patch)
tree7d5ef2206ea10afb4f992dc3de5b925e99cc7c0c /src
parentc933bb7e37a209c8f29c8a376d274c01ce460079 (diff)
svm: check svm_msg_q_size_to_alloc success
svm_msg_q_size_to_alloc must return a valid base address, if it fails pass up the error for handling Type: fix Change-Id: I408492f65f646862122acb9a187819b3bbf4f91c Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Diffstat (limited to 'src')
-rw-r--r--src/svm/fifo_segment.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 489ca2a4929..c2ba6c0eb28 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -1098,6 +1098,9 @@ fifo_segment_msg_q_alloc (fifo_segment_t *fs, u32 mq_index,
size = svm_msg_q_size_to_alloc (cfg);
base = fsh_alloc_aligned (fsh, size, 8);
+ if (!base)
+ return 0;
+
fsh->n_reserved_bytes += size;
smq = svm_msg_q_init (base, cfg);