[PATCH 8/8] ipipe: Drop unneeded NULL check from grab_timer

Jan Kiszka jan.kiszka at siemens.com
Wed Mar 27 14:18:07 CET 2019


From: Jan Kiszka <jan.kiszka at siemens.com>

If evtdev should be NULL, we will crash on get_dev_mode(evtdev) further
down. So this test is never false in absence of sever bugs.

Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
---
 kernel/ipipe/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/ipipe/timer.c b/kernel/ipipe/timer.c
index 1471a4ed85ea..22d5e5be874a 100644
--- a/kernel/ipipe/timer.c
+++ b/kernel/ipipe/timer.c
@@ -452,7 +452,7 @@ static void grab_timer(void *arg)
 		return;
 	}
 
-	steal = evtdev != NULL && !clockevent_state_detached(evtdev);
+	steal = !clockevent_state_detached(evtdev);
 	if (steal && evtdev->ipipe_stolen == 0) {
 		timer->real_mult = evtdev->mult;
 		timer->real_shift = evtdev->shift;
-- 
2.16.4




More information about the Xenomai mailing list