Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6330f9cf authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

staging: nvec: potential NULL dereference on error path



We assume nvec->rx can be NULL earlier so I have added a check here as
well.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb4855b4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -681,7 +681,8 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
			dev_err(nvec->dev,
				"RX buffer overflow on %p: "
				"Trying to write byte %u of %u\n",
				nvec->rx, nvec->rx->pos, NVEC_MSG_SIZE);
				nvec->rx, nvec->rx ? nvec->rx->pos : 0,
				NVEC_MSG_SIZE);
		break;
	default:
		nvec->state = 0;