mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
serial: 8250_dw: Disable clock on error
[ Upstream commit8af016aa5a] If there is no clock rate for uartclk defined, disable the previously enabled clock again. Found by Linux Driver Verification project (linuxtesting.org). Fixes:23f5b3fdd0serial: 8250_dw: only get the clock rate in one place Signed-off-by: Stefan Potyra <Stefan.Potyra@elektrobit.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f1be266203
commit
79c3f5cf46
@@ -513,7 +513,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");
|
||||
|
||||
Reference in New Issue
Block a user