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@xxxxxxxxx> > Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>