[PATCH 12/12] grcan.c: Fix Unused value (CID #1437613)

Ryan Long thisisryanlong at gmail.com
Thu Mar 4 19:50:25 UTC 2021


CID 1437613: Unused value in grcan_set_filter().
This fix was recommended by Daniel Hellstrom (daniel at gaisler.com).

Closes #4301
---
 bsps/shared/grlib/can/grcan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/shared/grlib/can/grcan.c b/bsps/shared/grlib/can/grcan.c
index d69d99d..a446d04 100644
--- a/bsps/shared/grlib/can/grcan.c
+++ b/bsps/shared/grlib/can/grcan.c
@@ -1787,7 +1787,7 @@ int grcan_set_sfilter(void *d, const struct grcan_filter *filter)
 	if ( !filter ){
 		/* disable TX/RX SYNC filtering */
 		pDev->sfilter.mask = 0xffffffff;
-		pDev->sfilter.mask = 0;
+		pDev->sfilter.code = 0;
 
 		 /* disable Sync interrupt */
 		SPIN_LOCK_IRQ(&pDev->devlock, oldLevel);
-- 
1.8.3.1



More information about the devel mailing list