[PATCH v2 9/9] usb: host: ohci-exynos: Convert to devm_of_phy_optional_get()

Greg Kroah-Hartman gregkh at linuxfoundation.org
Wed Jan 25 06:38:22 PST 2023


On Tue, Jan 24, 2023 at 07:37:28PM +0100, Geert Uytterhoeven wrote:
> Use the new devm_of_phy_optional_get() helper instead of open-coding the
> same operation.
> 
> As devm_of_phy_optional_get() returns NULL if either the PHY cannot be
> found, or if support for the PHY framework is not enabled, it is no
> longer needed to check for -ENODEV or -ENOSYS.
> 
> This lets us drop several checks for IS_ERR(), as phy_power_{on,off}()
> handle NULL parameters fine.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> Acked-by: Alan Stern <stern at rowland.harvard.edu>

Acked-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>



More information about the linux-arm-kernel mailing list