staging: most: make function most_submit_mbo return void
authorChristian Gromm <christian.gromm@microchip.com>
Wed, 21 Sep 2016 12:49:05 +0000 (14:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2016 09:54:46 +0000 (11:54 +0200)
commita6f9d846cc0980ef85ba9a2c863cef2f6202ac83
treebd1db62cbb8a8924050af9ca29974c7e3bb50d01
parent95842bc9fd03e51e4fa370c40542e2306d079699
staging: most: make function most_submit_mbo return void

Function most_submit_mbo() causes an exception only if either the pointer
mbo or mbo->context equals NULL. From the underlying architecture's point
of view both cases must _not_ come true and would happen only, if something
has tampered with the pointers. This would render runtime code unable to
recover anyway. So, instead trying to hide that things are already
critically out of control we're better off with a WARN_ON() assertion.

This patch replaces the return type of the function most_submit_mbo() with
'void' and adds a WARN_ONCE() assertion. Additionally, code calling the
function is adapted accordingly.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-cdev/cdev.c
drivers/staging/most/aim-sound/sound.c
drivers/staging/most/mostcore/core.c
drivers/staging/most/mostcore/mostcore.h