[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f1a2a717-f89b-d4c4-02aa-dd106eaed0a9@web.de>
Date: Sat, 2 May 2020 18:48:16 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-clk@...r.kernel.org,
Michael Turquette <mturquette@...libre.com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Stephen Boyd <sboyd@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: clk: keystone: Clarification for a return value check in
_of_pll_clk_init()
Hello,
I have tried another small script out for the semantic patch language.
This source code analysis approach points out that the function “clk_register_pll”
is called by the function “_of_pll_clk_init”.
https://elixir.bootlin.com/linux/v5.7-rc3/source/drivers/clk/keystone/pll.c#L153
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/keystone/pll.c?id=690e2aba7beb1ef06352803bea41a68a3c695015#n153
A null pointer check is performed at this place.
The function “clk_register_pll” (from the same source file) can eventually
return the pointer “ERR_PTR(-ENOMEM)”.
Is there a need to take this special case also into account?
Regards,
Markus
Powered by blists - more mailing lists