Guo Mengqi b9f1736e47 serial: 8250_bcm2835aux: Add missing clk_disable_unprepare()
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@huawei.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Guo Mengqi <guomengqi3@huawei.com>
Link: https://lore.kernel.org/r/20220715023312.37808-1-guomengqi3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-28 10:33:44 +02:00
..
2022-06-04 13:42:53 -07:00
2021-07-27 12:17:21 +02:00
2022-01-31 14:30:06 +01:00
2021-07-27 12:17:21 +02:00
2021-10-21 12:35:35 +02:00
2021-10-21 12:35:35 +02:00
2022-05-19 18:26:17 +02:00
2021-12-20 10:00:30 +01:00
2021-07-27 12:17:21 +02:00
2022-05-19 18:26:17 +02:00
2022-06-10 13:32:52 +02:00
2021-04-15 10:32:17 +02:00
2021-07-27 12:17:21 +02:00
2021-07-27 12:17:21 +02:00