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:
parent
6dc7545135
commit
56f3bd1cd3
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue