]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mtip32xx: uninitialized variable in mtip_quiesce_io()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Nov 2011 11:59:00 +0000 (12:59 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 24 Nov 2011 11:59:00 +0000 (12:59 +0100)
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>
drivers/block/mtip32xx/mtip32xx.c

index b5d843a02bfade83fb815b06d6aef87a4584671f..9bc10e31a143bd339ae48d43de9f04d7919143fb 100644 (file)
@@ -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 {