From 1063a44ec6926be1d96629681650b8a710790645 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Mon, 8 May 2017 23:31:14 +0200 Subject: [PATCH] nrf5/modules/timer: Remove test which is covered by timer_find() function in the line below. --- nrf5/modules/machine/timer.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nrf5/modules/machine/timer.c b/nrf5/modules/machine/timer.c index 1e92549327..3806fca7e0 100644 --- a/nrf5/modules/machine/timer.c +++ b/nrf5/modules/machine/timer.c @@ -95,12 +95,6 @@ STATIC mp_obj_t machine_timer_make_new(const mp_obj_type_t *type, size_t n_args, mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - if (args[ARG_NEW_id].u_obj == MP_OBJ_NEW_SMALL_INT(-1)) { - // index -1 does not exist - return mp_const_none; - // TODO: raise exception - } - // get static peripheral object int timer_id = timer_find(args[ARG_NEW_id].u_obj); const machine_timer_obj_t *self = &machine_timer_obj[timer_id];