]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pstore: Use zlib_inflateInit2 instead of zlib_inflateInit
authorAruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Wed, 11 Sep 2013 17:58:03 +0000 (10:58 -0700)
committerTony Luck <tony.luck@intel.com>
Wed, 11 Sep 2013 23:13:10 +0000 (16:13 -0700)
Since zlib_deflateInit2() is used for specifying window bit during compression,
zlib_inflateInit2() is appropriate for decompression.

Reported-by: Seiji Aguchi <seiji.aguchi@hds.com>
Tested-by: Seiji Aguchi <seiji.aguchi@hds.com>
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
fs/pstore/platform.c

index 4efaa75d3925b1b75b8a9040c3133c7435579633..18924c70394daae47e2c6521d02b23a83c9988ef 100644 (file)
@@ -168,7 +168,7 @@ static int pstore_decompress(void *in, void *out, size_t inlen, size_t outlen)
        int err, ret;
 
        ret = -EIO;
-       err = zlib_inflateInit(&stream);
+       err = zlib_inflateInit2(&stream, WINDOW_BITS);
        if (err != Z_OK)
                goto error;