Fix gunzip in case of insufficient output buffer

U-Boot's gunzip() function does not handle the return code
of zlib's inflate() function correctly. gunzip() is implemented
to uncompress all input data in one run. So the correct return
code for the good case is Z_STREAM_END. In case of insufficient
output buffer memory inflate returns Z_OK. For gunzip() this
is an error.

It also makes sense to me to call inflateEnd() also in case
of an error.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index a8f85e9..9055672 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -350,7 +350,7 @@
 		printf ("   Uncompressing %s ... ", type_name);
 		if (gunzip ((void *)load, unc_len,
 					(uchar *)image_start, &image_len) != 0) {
-			puts ("GUNZIP: uncompress or overwrite error "
+			puts ("GUNZIP: uncompress, out-of-mem or overwrite error "
 				"- must RESET board to recover\n");
 			if (boot_progress)
 				show_boot_progress (-6);