Skip to content

Commit

Permalink
event/cnxk: fix uninitialized local variables
Browse files Browse the repository at this point in the history
[ upstream commit de3f033 ]

Fix uninitialized local variable as reported in coverity scan.

Coverity issue: 370578, 370579, 370587
Fixes: 300b796 ("event/cnxk: add timer arm routine")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
  • Loading branch information
gmuthukrishn authored and kevintraynor committed Feb 28, 2022
1 parent 52d824d commit fec66e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/event/cnxk/cnxk_tim_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cnxk_tim_timer_arm_burst(const struct rte_event_timer_adapter *adptr,
struct cnxk_tim_ring *tim_ring = adptr->data->adapter_priv;
struct cnxk_tim_ent entry;
uint16_t index;
int ret;
int ret = 0;

cnxk_tim_sync_start_cyc(tim_ring);
for (index = 0; index < nb_timers; index++) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/event/cnxk/cnxk_tim_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ cnxk_tim_add_entry_sp(struct cnxk_tim_ring *const tim_ring,
const struct cnxk_tim_ent *const pent,
const uint8_t flags)
{
struct cnxk_tim_ent *chunk = NULL;
struct cnxk_tim_bkt *mirr_bkt;
struct cnxk_tim_ent *chunk;
struct cnxk_tim_bkt *bkt;
uint64_t lock_sema;
int16_t rem;
Expand Down Expand Up @@ -316,8 +316,8 @@ cnxk_tim_add_entry_mp(struct cnxk_tim_ring *const tim_ring,
const struct cnxk_tim_ent *const pent,
const uint8_t flags)
{
struct cnxk_tim_ent *chunk = NULL;
struct cnxk_tim_bkt *mirr_bkt;
struct cnxk_tim_ent *chunk;
struct cnxk_tim_bkt *bkt;
uint64_t lock_sema;
int64_t rem;
Expand Down

0 comments on commit fec66e6

Please sign in to comment.