unsigned int bits = 0;
unsigned int reg;
unsigned int mode;
- unsigned int clk_src;
- u64 ps;
+ unsigned int clk_src = 0;
+ u64 ps = 0;
+ int ret;
bool force_alt_sync;
/* only m series and 660x variants have counting mode registers */
break;
}
- ni_tio_generic_clock_src_select(counter, &clk_src);
- ni_tio_clock_period_ps(counter, clk_src, &ps);
-
+ ret = ni_tio_generic_clock_src_select(counter, &clk_src);
+ if (ret)
+ return;
+ ret = ni_tio_clock_period_ps(counter, clk_src, &ps);
+ if (ret)
+ return;
/*
* It's not clear what we should do if clock_period is unknown, so we
* are not using the alt sync bit in that case.
unsigned int *clock_source,
unsigned int *period_ns)
{
- u64 temp64;
+ u64 temp64 = 0;
int ret;
ret = ni_tio_generic_clock_src_select(counter, clock_source);