]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: uhci-platform: Make the clock really optional
authorAlexey Charkov <alchark@gmail.com>
Fri, 25 Apr 2025 14:11:11 +0000 (18:11 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:21:23 +0000 (08:21 +0200)
commitcf61669c50ce9c3b3a50205bd12139b0358c991b
tree54ee94ff0e14e020e1ebeb6c8aec718782d8f3ea
parentb04cfc229af7e5fc59515b1f35ef7729952ad616
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>
drivers/usb/host/uhci-platform.c