From: chenqiwu
stable inclusion
from stable-5.10
category: feature
commit:e030b80ff4a587ba223eee8ac06df214483dba25
issue: #I4919J
--------------------------------
Remove unnecessary ramoops_unregister_dummy() if ramoops
platform device register failed.
Signed-off-by: chenqiwu
Link: https://lore.kernel.org/r/1581068800-13817-2-git-send-email-qiwuchen55@gmail...
Signed-off-by: Kees Cook
(cherry picked from commit e030b80ff4a587ba223eee8ac06df214483dba25)
Signed-off-by: roger
---
fs/pstore/ram.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 7a61743177ee..36a2722fe1e5 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -977,7 +977,6 @@ static void __init ramoops_register_dummy(void)
pr_info("could not create platform device: %ld\n",
PTR_ERR(dummy));
dummy = NULL;
- ramoops_unregister_dummy();
}
}
--
2.17.1