[PATCH] hwrng: bcm2835 - remove redundant null check

Florian Fainelli f.fainelli at gmail.com
Tue Feb 9 17:54:34 EST 2021


On 2/8/21 10:25 PM, Tian Tao wrote:
> clk_prepare_enable() and clk_disable_unprepare() will check
> NULL clock parameter, so It is not necessary to add additional checks.
> 
> Signed-off-by: Tian Tao <tiantao6 at hisilicon.com>

I don't believe this is going to work unless you also change
devm_clk_get() to devm_clk_get_optional() which will deal with -ENOENT
and return NULL in that case, once you do that we can remove the NULL
pointer checks.
-- 
Florian



More information about the linux-arm-kernel mailing list