lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230712102246.10348-1-duminjie@vivo.com>
Date:   Wed, 12 Jul 2023 18:22:46 +0800
From:   Minjie Du <duminjie@...o.com>
To:     Santosh Shilimkar <ssantosh@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        linux-kernel@...r.kernel.org (open list:ARM/TEXAS INSTRUMENT KEYSTONE
        CLOCK FRAMEWORK),
        linux-clk@...r.kernel.org (open list:COMMON CLK FRAMEWORK)
Cc:     opensource.kernel@...o.com, Minjie Du <duminjie@...o.com>
Subject: [PATCH v1] drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()

The function clk_register_pll() may return NULL(in line 149) or ERR_PTR
(in line 131).
Fix: make IS_ERR_OR_NULL() judge the clk_register_pll() function return.

Signed-off-by: Minjie Du <duminjie@...o.com>
---
 drivers/clk/keystone/pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c
index d59a7621b..ee5c72369 100644
--- a/drivers/clk/keystone/pll.c
+++ b/drivers/clk/keystone/pll.c
@@ -209,7 +209,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl)
 	}
 
 	clk = clk_register_pll(NULL, node->name, parent_name, pll_data);
-	if (clk) {
+	if (!IS_ERR_OR_NULL(clk)) {
 		of_clk_add_provider(node, of_clk_src_simple_get, clk);
 		return;
 	}
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ