base: Context negative num mpus segfault
This patch fixes a bug that would result in a segfault if a negative number of
mpus are requested when creating a MARS context.
Also the internal function mars_mpu_max() now returns 0 as a successful result.
The caller is responsible for handling a return of 0 appropriately.
MARS_ERROR_INTERNAL is only returned if there was some error to retrieve the
count.
Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
Acked-by: Kazunori Asayama <asayama@sm.sony.co.jp>
4 files changed