If the persistent ram buffer is not available, ram_console_late_init
would crash when dereferencing ram_console_zone. Return early if
ram console was not initialized.
CC: Android Kernel Team <[email protected]>
Signed-off-by: Colin Cross <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
struct proc_dir_entry *entry;
struct persistent_ram_zone *prz = ram_console_zone;
+ if (!prz)
+ return 0;
+
if (persistent_ram_old_size(prz) == 0)
return 0;