Skip to content

Commit 34bb0f4

Browse files
authored
Fix use of uninitialized pointer
1 parent 44569b9 commit 34bb0f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/hal/drivers/mesa-hostmot2

src/hal/drivers/mesa-hostmot2/inmux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ int hm2_inmux_parse_md(hostmot2_t *hm2, int md_index) {
165165
hm2->llio->read(hm2->llio,hm2->inmux.control_addr + (i * md->instance_stride),&temp, sizeof(rtapi_u32));
166166
temp = (temp & 0x0000001f) +1;
167167
hm2->inmux.instance[i].scanwidth = temp;
168-
*hm2->inmux.instance[i].hal.param.scan_width = temp;
169168

170169
rtapi_snprintf(name, sizeof(name), "%s.inmux.%02d.scan_rate", hm2->llio->name, i);
171170
r = hal_pin_u32_new(name, HAL_OUT, &(hm2->inmux.instance[i].hal.param.scan_rate), hm2->llio->comp_id);
@@ -215,7 +214,8 @@ int hm2_inmux_parse_md(hostmot2_t *hm2, int md_index) {
215214
HM2_ERR("error adding param '%s', aborting\n", name);
216215
goto fail1;
217216
}
218-
217+
*hm2->inmux.instance[i].hal.param.scan_width = temp;
218+
219219
{
220220
unsigned j = 0;
221221
for (j = 0; j < hm2->inmux.instance[i].scanwidth; j++){

0 commit comments

Comments
 (0)