Skip to content

Commit 1b25817

Browse files
zmshahahamysterywolf
authored andcommitted
[components][drivers]fix some uninitialize err (#8806)
fix some uninitialize err
1 parent aca7a71 commit 1b25817

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

components/drivers/clk/clk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ rt_ssize_t rt_ofw_count_of_clk(struct rt_ofw_node *clk_ofw_np)
10281028

10291029
if (prop)
10301030
{
1031-
rt_uint32_t max_idx, idx;
1031+
rt_uint32_t max_idx = 0, idx;
10321032

10331033
for (cell = rt_ofw_prop_next_u32(prop, RT_NULL, &idx);
10341034
cell;

components/drivers/ofw/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ struct rt_ofw_node *rt_ofw_get_cpu_node(int cpu, int *thread, rt_bool_t (*match_
870870

871871
rt_ofw_foreach_cpu_node(cpu_np)
872872
{
873-
rt_ssize_t prop_len;
873+
rt_ssize_t prop_len = 0;
874874
rt_bool_t is_end = RT_FALSE;
875875
int tid, addr_cells = rt_ofw_io_addr_cells(cpu_np);
876876
const fdt32_t *cell = rt_ofw_prop_read_raw(cpu_np, propname, &prop_len);

components/drivers/ofw/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static rt_err_t ofw_parse_irq_map(struct rt_ofw_node *np, struct rt_ofw_cell_arg
4343
struct rt_ofw_node *ic_np = RT_NULL;
4444
const fdt32_t *addr, *map, *map_mask;
4545
int child_address_cells, child_interrupt_cells;
46-
int parent_address_cells, parent_interrupt_cells;
46+
int parent_address_cells = 0, parent_interrupt_cells = 0;
4747
int addr_cells, pin_cells, icaddr_cells, idx1, idx2, limit;
4848

4949
/*

0 commit comments

Comments
 (0)