lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/RFT v2 04/11] phy: rockchip: Support PCIe v3
From
Date
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

\
 
 \ /
  Last update: 2022-04-28 09:39    [W:0.151 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site