[components][drivers]fix some uninitialize err (#8806)

fix some uninitialize err
This commit is contained in:
zms123456 2024-04-16 21:58:13 +08:00 committed by Meco Man
parent aca7a71815
commit 1b258175a8
3 changed files with 3 additions and 3 deletions

View File

@ -1028,7 +1028,7 @@ rt_ssize_t rt_ofw_count_of_clk(struct rt_ofw_node *clk_ofw_np)
if (prop) if (prop)
{ {
rt_uint32_t max_idx, idx; rt_uint32_t max_idx = 0, idx;
for (cell = rt_ofw_prop_next_u32(prop, RT_NULL, &idx); for (cell = rt_ofw_prop_next_u32(prop, RT_NULL, &idx);
cell; cell;

View File

@ -870,7 +870,7 @@ struct rt_ofw_node *rt_ofw_get_cpu_node(int cpu, int *thread, rt_bool_t (*match_
rt_ofw_foreach_cpu_node(cpu_np) rt_ofw_foreach_cpu_node(cpu_np)
{ {
rt_ssize_t prop_len; rt_ssize_t prop_len = 0;
rt_bool_t is_end = RT_FALSE; rt_bool_t is_end = RT_FALSE;
int tid, addr_cells = rt_ofw_io_addr_cells(cpu_np); int tid, addr_cells = rt_ofw_io_addr_cells(cpu_np);
const fdt32_t *cell = rt_ofw_prop_read_raw(cpu_np, propname, &prop_len); const fdt32_t *cell = rt_ofw_prop_read_raw(cpu_np, propname, &prop_len);

View File

@ -43,7 +43,7 @@ static rt_err_t ofw_parse_irq_map(struct rt_ofw_node *np, struct rt_ofw_cell_arg
struct rt_ofw_node *ic_np = RT_NULL; struct rt_ofw_node *ic_np = RT_NULL;
const fdt32_t *addr, *map, *map_mask; const fdt32_t *addr, *map, *map_mask;
int child_address_cells, child_interrupt_cells; int child_address_cells, child_interrupt_cells;
int parent_address_cells, parent_interrupt_cells; int parent_address_cells = 0, parent_interrupt_cells = 0;
int addr_cells, pin_cells, icaddr_cells, idx1, idx2, limit; int addr_cells, pin_cells, icaddr_cells, idx1, idx2, limit;
/* /*