staging: zcache: fix a compile warning
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Tue, 26 Jun 2012 08:50:10 +0000 (16:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jul 2012 18:31:15 +0000 (11:31 -0700)
Fix:

drivers/staging/zcache/zcache-main.c: In function ‘zcache_comp_op’:
drivers/staging/zcache/zcache-main.c:112:2: warning: ‘ret’ may be used uninitial

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zcache/zcache-main.c

index 55fbe3db7d5342ea013852d31c4051426097c6ad..58e7bd432508a74d9d3c41bd962e7d037e5f722a 100644 (file)
@@ -109,6 +109,8 @@ static inline int zcache_comp_op(enum comp_op op,
        case ZCACHE_COMPOP_DECOMPRESS:
                ret = crypto_comp_decompress(tfm, src, slen, dst, dlen);
                break;
+       default:
+               ret = -EINVAL;
        }
        put_cpu();
        return ret;