staging: most: allocate only all requested memory
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 8 May 2018 09:44:49 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 May 2018 11:41:48 +0000 (13:41 +0200)
commitaaf403225ba093b66b10f2ab622adb6e5a462f4a
tree22b9b50f5c07b49444bacd6dd85f522a922752ae
parent8a95c13224f9be12a71794e17862bb1410334108
staging: most: allocate only all requested memory

This prohibits the allocation of the memory for the MBOs if only the
part of the MBOs, requested by the application, may be allocated.  The
function arm_mbo_chain, if cannot allocate all requested MBO, frees all
prior allocated memory and returns 0.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/core.c