memif: fix coverity divide by zero 01/10001/2
authorSteven <[email protected]>
Mon, 8 Jan 2018 17:24:04 +0000 (09:24 -0800)
committerDamjan Marion <[email protected]>
Tue, 9 Jan 2018 20:20:13 +0000 (20:20 +0000)
commit8554f8adcc97b10eee674762307bfb2ede76d722
tree4151f47bfd47bb069a87346576c54b889fbada03
parent6f1e8b9947ec23b524f340da035c37c07938c268
memif: fix coverity divide by zero

Coverity complains about divide by zero if tx_queues gets the value of 0
from the macro vec_len(). While we don't anticipate such condition to
happen, programming errors may exist. To defend against divide by zero,
crash and burn if tx_queues gets a value of 0.

Change-Id: I65e014c07e9d4adfe119d5b373b5dc24cb818a03
Signed-off-by: Steven <[email protected]>
src/plugins/memif/device.c