9
0
Fork 0

usb: ohci-at91: Check result of clk_get()

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Andrey Smirnov 2017-03-08 14:09:00 -08:00 committed by Sascha Hauer
parent 6dc7545135
commit 56f3bd1cd3
1 changed files with 9 additions and 0 deletions

View File

@ -47,7 +47,16 @@ static int at91_ohci_probe(struct device_d *dev)
struct ohci_regs __iomem *regs = (struct ohci_regs __iomem *)dev->resource[0].start;
iclk = clk_get(NULL, "ohci_clk");
if (IS_ERR(iclk)) {
dev_err(dev, "Failed to get 'ohci_clk'\n");
return PTR_ERR(iclk);
}
fclk = clk_get(NULL, "uhpck");
if (IS_ERR(fclk)) {
dev_err(dev, "Failed to get 'uhpck'\n");
return PTR_ERR(fclk);
}
/*
* Start the USB clocks.