]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
cifs: fix two compiler warning about uninitialized vars
authorJeff Layton <jlayton@redhat.com>
Sat, 29 Jan 2011 12:03:02 +0000 (07:03 -0500)
committerSteve French <sfrench@us.ibm.com>
Mon, 31 Jan 2011 03:15:57 +0000 (03:15 +0000)
fs/cifs/link.c: In function ‘symlink_hash’:
fs/cifs/link.c:58:3: warning: ‘rc’ may be used uninitialized in this
function [-Wuninitialized]

fs/cifs/smbencrypt.c: In function ‘mdfour’:
fs/cifs/smbencrypt.c:61:3: warning: ‘rc’ may be used uninitialized in this
function [-Wuninitialized]

Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/link.c
fs/cifs/smbencrypt.c

index 02cd60aefbff8906671c4f018dc38028efda4975..e8804d3734044f578da6d4427e4961431d61ae5a 100644 (file)
@@ -55,8 +55,9 @@ symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash)
 
        md5 = crypto_alloc_shash("md5", 0, 0);
        if (IS_ERR(md5)) {
+               rc = PTR_ERR(md5);
                cERROR(1, "%s: Crypto md5 allocation error %d\n", __func__, rc);
-               return PTR_ERR(md5);
+               return rc;
        }
        size = sizeof(struct shash_desc) + crypto_shash_descsize(md5);
        sdescmd5 = kmalloc(size, GFP_KERNEL);
index b5450e9f40c022e7b7de3db1a0286cb1bcd089fc..b5041c84998137a6bbe251df2c7c55806def0cb4 100644 (file)
@@ -58,8 +58,9 @@ mdfour(unsigned char *md4_hash, unsigned char *link_str, int link_len)
 
        md4 = crypto_alloc_shash("md4", 0, 0);
        if (IS_ERR(md4)) {
+               rc = PTR_ERR(md4);
                cERROR(1, "%s: Crypto md4 allocation error %d\n", __func__, rc);
-               return PTR_ERR(md4);
+               return rc;
        }
        size = sizeof(struct shash_desc) + crypto_shash_descsize(md4);
        sdescmd4 = kmalloc(size, GFP_KERNEL);