aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wahren <[email protected]>2023-12-20 12:43:34 +0100
committerGreg Kroah-Hartman <[email protected]>2024-01-04 16:23:03 +0100
commit83e571f054cd742eb9a46d46ef05193904adf53f (patch)
tree59e70242849c2564c9b50dda30de37d81ba31950
parentaba8290f368d965d49c929a283b3bf41783d3ada (diff)
serial: 8250_bcm2835aux: Restore clock error handling
The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support") dropped the error handling for clock acquiring. But even an optional clock needs this. Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support") Cc: stable <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/tty/serial/8250/8250_bcm2835aux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
index b5760f914a8c..beac6b340ace 100644
--- a/drivers/tty/serial/8250/8250_bcm2835aux.c
+++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
@@ -119,6 +119,8 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
/* get the clock - this also enables the HW */
data->clk = devm_clk_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(data->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(data->clk), "could not get clk\n");
/* get the interrupt */
ret = platform_get_irq(pdev, 0);