[PATCH -next v3] serial: 8250_bcm2835aux: Add missing clk_disable_unprepare()

Florian Fainelli f.fainelli at gmail.com
Thu Jul 14 19:41:02 PDT 2022



On 7/14/2022 7:33 PM, Guo Mengqi wrote:
> The error path when get clock frequency fails in bcm2835aux_serial
> driver does not correctly disable the clock.
> 
> This flaw was found using a static analysis tool "Hulk Robot", which
> reported the following warning when analyzing linux-next/master:
> 
>      drivers/tty/serial/8250/8250_bcm2835aux.c:
>      warning: clk_disable_unprepare_missing.cocci
> 
> The cocci script checks for the existence of clk_disable_unprepare()
> paired with clk_prepare_enable().
> 
> Add the missing clk_disable_unprepare() to the error path.
> 
> Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> Reported-by: Hulk Robot <hulkci at huawei.com>
> Signed-off-by: Guo Mengqi <guomengqi3 at huawei.com>

Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
-- 
Florian



More information about the linux-rpi-kernel mailing list