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: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user