[RFC/RFT v2 04/11] phy: rockchip: Support PCIe v3

Philipp Zabel p.zabel at pengutronix.de
Thu Apr 28 00:38:13 PDT 2022


Hi Frank,

On Di, 2022-04-26 at 15:21 +0200, Frank Wunderlich wrote:
> +	priv->p30phy = devm_reset_control_get_exclusive(dev, "phy");
> +	if (IS_ERR(priv->p30phy)) {
> +		dev_warn(dev, "no phy reset control specified\n");
> +		priv->p30phy = NULL;
> +	}

Please use devm_reset_control_get_optional_exclusive() [1] instead,
which already returns NULL if no reset control is specified, and return
on errors.

[1] https://docs.kernel.org/driver-api/reset.html#c.devm_reset_control_get_optional_exclusive

regards
Philipp



More information about the linux-phy mailing list