From: Yue Hu <zbestahu@gmail.com>
To: anton@enomsg.org, ccross@android.com, tony.luck@intel.com,
keescook@chromium.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pstore/ram: Avoid possible failure of dummy device unregister
Date: Thu, 14 Feb 2019 19:31:13 +0800 [thread overview]
Message-ID: <20190214193113.0000609f.zbestahu@gmail.com> (raw)
From 08ac260f36b4c11eb33fa58466462a5e1027bdb3 Mon Sep 17 00:00:00 2001
From: Yue Hu <zbestahu@gmail.com>
Date: Thu, 14 Feb 2019 19:34:16 +0800
Subject: [PATCH] pstore/ram: Avoid possible failure of dummy device unregister
If create dummy platform device failed, dummy variable should not
been set as NULL. Because the following platform_device_unregister()
will judge if the dummy is NULL or not, if dummy is NULL nothing
happen for unregister flow.
Signed-off-by: Yue Hu <zbestahu@gmail.com>
---
fs/pstore/ram.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 4a06675..61bc573 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -994,7 +994,6 @@ static void __init ramoops_register_dummy(void)
if (IS_ERR(dummy)) {
pr_info("could not create platform device: %ld\n",
PTR_ERR(dummy));
- dummy = NULL;
ramoops_unregister_dummy();
}
}
--
1.9.1
next reply other threads:[~2019-02-14 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 11:31 Yue Hu [this message]
2019-02-14 16:22 ` Kees Cook
[not found] <5c46c41c.1c69fb81.13fc6.834eSMTPIN_ADDED_BROKEN@mx.google.com>
2019-02-12 20:16 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190214193113.0000609f.zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome