target/riscv-013: fix unused initialization
[fw/openocd] / src / target / riscv / riscv-013.c
index 1f4c34346a8c5062e7c69ffc8c7267fc433d1bd6..99d3873de84ccdd62dd1ac2ed94f91fd58c0f704 100644 (file)
@@ -2359,9 +2359,7 @@ static int assert_reset(struct target *target)
                /* TODO: Try to use hasel in dmcontrol */
 
                /* Set haltreq for each hart. */
-               uint32_t control = control_base;
-
-               control = set_hartsel(control_base, target->coreid);
+               uint32_t control = set_hartsel(control_base, target->coreid);
                control = set_field(control, DM_DMCONTROL_HALTREQ,
                                target->reset_halt ? 1 : 0);
                dmi_write(target, DM_DMCONTROL, control);