aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init/do_mounts_rd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 6be2879cca66..143e98de6f29 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -342,6 +342,13 @@ static int __init crd_load(int in_fd, int out_fd, decompress_fn deco)
342 int result; 342 int result;
343 crd_infd = in_fd; 343 crd_infd = in_fd;
344 crd_outfd = out_fd; 344 crd_outfd = out_fd;
345
346 if (!deco) {
347 pr_emerg("Invalid ramdisk decompression routine. "
348 "Select appropriate config option.\n");
349 panic("Could not decompress initial ramdisk image.");
350 }
351
345 result = deco(NULL, 0, compr_fill, compr_flush, NULL, NULL, error); 352 result = deco(NULL, 0, compr_fill, compr_flush, NULL, NULL, error);
346 if (decompress_error) 353 if (decompress_error)
347 result = 1; 354 result = 1;