[PATCH 054/190] Revert "clk: samsung: Remove redundant check in samsung_cmu_register_one"

Greg Kroah-Hartman
2021-04-21T13:04:10Z

This reverts commit 8d7a577d04e8ce24b1b81ee44ec8cd1dda2a9cd9.

Commits from @umn.edu addresses have been found to be submitted in "bad
faith" to try to test the kernel community's ability to review "known
malicious" changes. The result of these submissions can be found in a
paper published at the 42nd IEEE Symposium on Security and Privacy
entitled, "Open Source Insecurity: Stealthily Introducing
Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University
of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from
the kernel tree and will need to be re-reviewed again to determine if
they actually are a valid fix. Until that work is complete, remove this
change to ensure that no problems are being introduced into the
codebase.

Cc: Aditya Pakki <pakki001@umn.edu>
Cc: https
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/samsung/clk.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 1949ae7851b2..dad31308c071 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -356,6 +356,10 @@ struct samsung_clk_provider * __init samsung_cmu_register_one(
}

ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
+ if (!ctx) {
+ panic("%s: unable to allocate ctx\n", __func__);
+ return ctx;
+ }

if (cmu->pll_clks)
samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
--
2.31.1