Commit b945804d authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'linux-can-next-for-5.20-20220721' of...

Merge tag 'linux-can-next-for-5.20-20220721' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
can-next 2022-07-21

The patch is by Vincent Mailhol and fixes a use on an uninitialized
variable in the pch_can driver (introduced in last pull request to
net-next).

* tag 'linux-can-next-for-5.20-20220721' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next:
  can: pch_can: pch_can_error(): initialize errc before using it
====================

Link: https://lore.kernel.org/r/20220721163042.3448384-1-mkl@pengutronix.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 32d00f62 9950f112
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -489,6 +489,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)
	if (!skb)
		return;

	errc = ioread32(&priv->regs->errc);
	if (status & PCH_BUS_OFF) {
		pch_can_set_tx_all(priv, 0);
		pch_can_set_rx_all(priv, 0);
@@ -502,7 +503,6 @@ static void pch_can_error(struct net_device *ndev, u32 status)
		cf->data[7] = (errc & PCH_REC) >> 8;
	}

	errc = ioread32(&priv->regs->errc);
	/* Warning interrupt. */
	if (status & PCH_EWARN) {
		state = CAN_STATE_ERROR_WARNING;