Commit c92e677b authored by Quytelda Kahja's avatar Quytelda Kahja Committed by Greg Kroah-Hartman

staging: most: Remove unnecessary usage of BUG_ON().

There is no need for the calls to BUG_ON() in this driver, which are
used to check if mbo or mbo->context are NULL; mbo is never NULL, and
if mbo->context is NULL it would have already been dereferenced and
oopsed before reaching the BUG_ON().
Signed-off-by: default avatarQuytelda Kahja <quytelda@tamalin.org>
Acked-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d956a1a9
...@@ -916,7 +916,6 @@ static void arm_mbo(struct mbo *mbo) ...@@ -916,7 +916,6 @@ static void arm_mbo(struct mbo *mbo)
unsigned long flags; unsigned long flags;
struct most_channel *c; struct most_channel *c;
BUG_ON((!mbo) || (!mbo->context));
c = mbo->context; c = mbo->context;
if (c->is_poisoned) { if (c->is_poisoned) {
...@@ -1019,8 +1018,6 @@ static void most_write_completion(struct mbo *mbo) ...@@ -1019,8 +1018,6 @@ static void most_write_completion(struct mbo *mbo)
{ {
struct most_channel *c; struct most_channel *c;
BUG_ON((!mbo) || (!mbo->context));
c = mbo->context; c = mbo->context;
if (mbo->status == MBO_E_INVAL) if (mbo->status == MBO_E_INVAL)
pr_info("WARN: Tx MBO status: invalid\n"); pr_info("WARN: Tx MBO status: invalid\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment