[patch] 2.3.39pre2: loop block device uninitialised var

From: Tim Waugh (tim@cyberelk.demon.co.uk)
Date: Sun Jan 09 2000 - 13:29:16 EST


lo_release never returns an error, but err is never actually initialised
to zero. Here's a tiny patch to get rid of err altogether.

Tim.
*/

--- linux-2.3.39pre2/drivers/block/loop.c~ Sun Jan 9 17:28:21 2000
+++ linux-2.3.39pre2/drivers/block/loop.c Sun Jan 9 17:28:44 2000
@@ -643,7 +643,7 @@
 static int lo_release(struct inode *inode, struct file *file)
 {
         struct loop_device *lo;
- int dev, err;
+ int dev;
 
         if (!inode)
                 return 0;
@@ -664,7 +664,7 @@
                         xfer_funcs[type]->unlock(lo);
                 MOD_DEC_USE_COUNT;
         }
- return err;
+ return 0;
 }
 
 static struct block_device_operations lo_fops = {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:14 EST