summaryrefslogtreecommitdiff
path: root/lib/decompress.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-08-21 15:26:37 -0700
committerMark Brown <broonie@kernel.org>2015-08-21 15:26:37 -0700
commitd033de5ceee8333e4fee3d59a956244d3736102a (patch)
tree5bdebcac18ed67890571632570c324e0c41a7223 /lib/decompress.c
parent1a8e7fab70c8d7cad2e606e7b21d46e42e51c2fd (diff)
parentf7644cbfcdf03528f0f450f3940c4985b2291f49 (diff)
Merge tag 'v4.2-rc6' into asoc-topology
Linux 4.2-rc6
Diffstat (limited to 'lib/decompress.c')
-rw-r--r--lib/decompress.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/decompress.c b/lib/decompress.c
index 528ff932d8e4..62696dff5730 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -59,8 +59,11 @@ decompress_fn __init decompress_method(const unsigned char *inbuf, long len,
{
const struct compress_format *cf;
- if (len < 2)
+ if (len < 2) {
+ if (name)
+ *name = NULL;
return NULL; /* Need at least this much... */
+ }
pr_debug("Compressed data magic: %#.2x %#.2x\n", inbuf[0], inbuf[1]);