drivers: staging: zcache: fix compile warning
authorBob Liu <lliubbo@gmail.com>
Tue, 2 Apr 2013 02:47:43 +0000 (10:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 19:43:41 +0000 (12:43 -0700)
Fix below compile warning:
staging/zcache/zcache-main.c: In function ‘zcache_autocreate_pool’:
staging/zcache/zcache-main.c:1393:13: warning: ‘cli’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zcache/zcache-main.c

index cf3001c..fb699df 100644 (file)
@@ -1335,7 +1335,7 @@ static int zcache_local_new_pool(uint32_t flags)
 int zcache_autocreate_pool(unsigned int cli_id, unsigned int pool_id, bool eph)
 {
        struct tmem_pool *pool;
-       struct zcache_client *cli;
+       struct zcache_client *cli = NULL;
        uint32_t flags = eph ? 0 : TMEM_POOL_PERSIST;
        int ret = -1;