aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/gunzip_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/gunzip_util.c')
-rw-r--r--arch/powerpc/boot/gunzip_util.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/boot/gunzip_util.c b/arch/powerpc/boot/gunzip_util.c
index e1e215e16983..ef2aed0f63ca 100644
--- a/arch/powerpc/boot/gunzip_util.c
+++ b/arch/powerpc/boot/gunzip_util.c
@@ -194,13 +194,10 @@ int gunzip_finish(struct gunzip_state *state, void *dst, int dstlen)
194{ 194{
195 int len; 195 int len;
196 196
197 len = gunzip_partial(state, dst, dstlen);
198
197 if (state->s.workspace) { 199 if (state->s.workspace) {
198 len = gunzip_partial(state, dst, dstlen);
199 zlib_inflateEnd(&state->s); 200 zlib_inflateEnd(&state->s);
200 } else {
201 /* uncompressed image */
202 len = min(state->s.avail_in, (unsigned)dstlen);
203 memcpy(dst, state->s.next_in, len);
204 } 201 }
205 202
206 return len; 203 return len;