]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4bfc6d7a36fa4fb930c124d610e2c1d25a018629
treebd1db62cbb8a8924050af9ca29974c7e3bb50d01
parent820037e66985ea2081607e687ce35568d3842952
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