mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
serial: 8250_dw: Disable clock on error
If there is no clock rate for uartclk defined, disable the previously
enabled clock again.
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: 23f5b3fdd0 serial: 8250_dw: only get the clock rate in one place
Signed-off-by: Stefan Potyra <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
0858fe3c9c
commit
8af016aa5a
1 changed files with 2 additions and 1 deletions
|
|
@ -515,7 +515,8 @@ static int dw8250_probe(struct platform_device *pdev)
|
|||
/* If no clock rate is defined, fail. */
|
||||
if (!p->uartclk) {
|
||||
dev_err(dev, "clock rate not defined\n");
|
||||
return -EINVAL;
|
||||
err = -EINVAL;
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
data->pclk = devm_clk_get(dev, "apb_pclk");
|
||||
|
|
|
|||
Loading…
Reference in a new issue