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>
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user