[PATCH] phy: rockchip-emmc: emmc_phy_init() always return 0

Chris Ruehl chris.ruehl at gtsys.com.hk
Tue Dec 8 20:29:27 EST 2020


On 8/12/2020 12:29 am, Doug Anderson wrote:
> Hi,
> 
> On Sun, Dec 6, 2020 at 8:13 PM Chris Ruehl <chris.ruehl at gtsys.com.hk> wrote:
>>
>> To be backwards compatible, and keep it optional, I can check if clock-names is
>> defined and if not, set emmcclk=null and return 0.
>> But if emmcclk is defined and an error returned from clk_get(), escalate it.
> 
> ...but how is this different than just checking for the -ENODEV (or
> maybe -ENOENT?) error return (other than being more complicated and
> requiring more code?)  ...or, perhaps even better, just use
> clk_get_optional()?
> 
> -Doug
> 

Hi,

yeah! good hint. Let me rewind, and use the optional function call.

Chris



More information about the Linux-rockchip mailing list