提交 350698f6 编写于 作者: L Laura Garcia Liebana 提交者: Greg Kroah-Hartman

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: NLaura Garcia Liebana <nevola@gmail.com>
Acked-by: NMarc Dietrich <marvin24@gmx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 aaa65731
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册