diff options
| author | Alexey Charkov <alchark@gmail.com> | 2025-04-25 18:11:11 +0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-18 08:24:53 +0200 |
| commit | a9f28dbfdd1e606295f32a3ae6de47965f401243 (patch) | |
| tree | 1c9c1999e2b6142624a34bb6536a38bb15eeb197 /drivers/usb/host | |
| parent | 92d0a28afba2166801ed563a72aed37cb8ea27f7 (diff) | |
| download | linux-a9f28dbfdd1e606295f32a3ae6de47965f401243.tar.gz linux-a9f28dbfdd1e606295f32a3ae6de47965f401243.tar.bz2 linux-a9f28dbfdd1e606295f32a3ae6de47965f401243.zip | |
usb: uhci-platform: Make the clock really optional
commit a5c7973539b010874a37a0e846e62ac6f00553ba upstream.
Device tree bindings state that the clock is optional for UHCI platform
controllers, and some existing device trees don't provide those - such
as those for VIA/WonderMedia devices.
The driver however fails to probe now if no clock is provided, because
devm_clk_get returns an error pointer in such case.
Switch to devm_clk_get_optional instead, so that it could probe again
on those platforms where no clocks are given.
Cc: stable <stable@kernel.org>
Fixes: 26c502701c52 ("usb: uhci: Add clk support to uhci-platform")
Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://lore.kernel.org/r/20250425-uhci-clock-optional-v1-1-a1d462592f29@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/uhci-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 3dec5dd3a0d5..712389599d46 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -121,7 +121,7 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev) } /* Get and enable clock if any specified */ - uhci->clk = devm_clk_get(&pdev->dev, NULL); + uhci->clk = devm_clk_get_optional(&pdev->dev, NULL); if (IS_ERR(uhci->clk)) { ret = PTR_ERR(uhci->clk); goto err_rmr; |
