Skip to content

Commit

Permalink
mtip32xx: uninitialized variable in mtip_quiesce_io()
Browse files Browse the repository at this point in the history
We recently introduce new continue in the loop which make gcc complain.
In theory if MTIP_FLAG_SVC_THD_ACTIVE_BIT is set, we could hit continue
over and over until eventually we time out of the loop.  In that case
"active" should be set as true, but right now it's uninitialized.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Dan Carpenter authored and Jens Axboe committed Nov 24, 2011
1 parent 60ec0ee commit 3e54a3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/block/mtip32xx/mtip32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,8 @@ static void mtip_issue_non_ncq_command(struct mtip_port *port, int tag)
static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout)
{
unsigned long to;
unsigned int n, active;
unsigned int n;
unsigned int active = 1;

to = jiffies + msecs_to_jiffies(timeout);
do {
Expand Down

0 comments on commit 3e54a3d

Please sign in to comment.