From: 黄涛 Date: Sat, 30 Jul 2011 14:27:11 +0000 (+0800) Subject: Revert "misc: apanic: erase kpanic when no data" X-Git-Tag: firefly_0821_release~9968 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b23fdb31d1d78138e21425f93a15124533a5e37;p=firefly-linux-kernel-4.4.55.git Revert "misc: apanic: erase kpanic when no data" This reverts commit b4c785a83a24830838f3293ff3e8ff5354509a66. --- diff --git a/drivers/misc/apanic.c b/drivers/misc/apanic.c index ca875f89da7a..f50881ba917d 100644 --- a/drivers/misc/apanic.c +++ b/drivers/misc/apanic.c @@ -297,7 +297,6 @@ static void mtd_panic_notify_add(struct mtd_info *mtd) struct panic_header *hdr = ctx->bounce; size_t len; int rc; - int proc_entry_created = 0; if (strcmp(mtd->name, CONFIG_APANIC_PLABEL)) return; @@ -359,7 +358,6 @@ static void mtd_panic_notify_add(struct mtd_info *mtd) ctx->apanic_console->write_proc = apanic_proc_write; ctx->apanic_console->size = hdr->console_length; ctx->apanic_console->data = (void *) 1; - proc_entry_created = 1; } } @@ -374,13 +372,9 @@ static void mtd_panic_notify_add(struct mtd_info *mtd) ctx->apanic_threads->write_proc = apanic_proc_write; ctx->apanic_threads->size = hdr->threads_length; ctx->apanic_threads->data = (void *) 2; - proc_entry_created = 1; } } - if (!proc_entry_created) - mtd_panic_erase(); - return; out_err: ctx->mtd = NULL;