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

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


On Tue, Jan 24, 2023 at 07:37:27PM +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>
> Reviewed-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

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



More information about the linux-phy mailing list