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

Commit d694b06c authored by Ed Spiridonov's avatar Ed Spiridonov Committed by Marc Kleine-Budde
Browse files

can: mcp251x: avoid write to error flag register if it's unnecessary



Only two bits (RX0OVR and RX1OVR) are writable in EFLG, write is useless
if these bits aren't set.

Signed-off-by: default avatarEd Spiridonov <edo.rus@gmail.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent c1bb0a55
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -843,7 +843,7 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
		if (clear_intf)
			mcp251x_write_bits(spi, CANINTF, clear_intf, 0x00);

		if (eflag)
		if (eflag & (EFLG_RX0OVR | EFLG_RX1OVR))
			mcp251x_write_bits(spi, EFLG, eflag, 0x00);

		/* Update can state */