mtd_blkdevs.c: quiet a "symbol shadows" sparse warning
authorhartleys <hartleys@visionengravers.com>
Fri, 16 Oct 2009 12:52:53 +0000 (12:52 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 20 Oct 2009 08:16:21 +0000 (17:16 +0900)
In register_mtd_blktrans(), the symbol 'ret' is already declared
as an int at the start of the function.  The inner loop declaration
is unnecessary.  Quiets the following sparse warning:

  warning: symbol 'ret' shadows an earlier one

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtd_blkdevs.c

index 0acbf4f5be50d31e31ccbce8d5e51db854e57f22..955226d74808ef7ca31836193090ae2f86b93348 100644 (file)
@@ -388,7 +388,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
        tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr,
                        "%sd", tr->name);
        if (IS_ERR(tr->blkcore_priv->thread)) {
-               int ret = PTR_ERR(tr->blkcore_priv->thread);
+               ret = PTR_ERR(tr->blkcore_priv->thread);
                blk_cleanup_queue(tr->blkcore_priv->rq);
                unregister_blkdev(tr->major, tr->name);
                kfree(tr->blkcore_priv);