summaryrefslogtreecommitdiff
path: root/drivers/staging/nvec
diff options
context:
space:
mode:
authorLaura Garcia Liebana <nevola@gmail.com>2016-02-24 18:11:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-11 22:09:09 -0800
commit350698f6efe844f9f40bf47da7bbab75eba34c61 (patch)
treee3bd1eaa84bff3e700ab452f7a4d45978888b19c /drivers/staging/nvec
parentaaa657312a6b483af870bd7b412a1467b7808725 (diff)
staging: nvec: Avoid the use of BUG_ON
Prevent a kernel panic by avoiding the use of the BUG_ON macro. Checkpatch detected this issue. The BUG_ON macro is not needed as such cases shouldn't happen and they were introduced for debugging purposes. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r--drivers/staging/nvec/nvec.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index c335ae2f1713..f6a1dbb4b66b 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -641,11 +641,9 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
nvec_msg_free(nvec, nvec->rx);
nvec->state = 3;
nvec_tx_set(nvec);
- BUG_ON(nvec->tx->size < 1);
to_send = nvec->tx->data[0];
nvec->tx->pos = 1;
} else if (status == (I2C_SL_IRQ)) {
- BUG_ON(nvec->rx == NULL);
nvec->rx->data[1] = received;
nvec->rx->pos = 2;
nvec->state = 4;