Re: [PATCH 4.19.y 06/17] usb: renesas_usbhs: Add multiple clocks management


Pavel Machek
 

Hi!

+ /*
+ * To backward compatibility with old DT, this driver checks the return
+ * value if it's -ENOENT or not.
+ */
+ priv->clks[1] = of_clk_get(dev->of_node, 1);
+ if (PTR_ERR(priv->clks[1]) == -ENOENT)
+ priv->clks[1] = NULL;
+ else if (IS_ERR(priv->clks[1]))
+ return PTR_ERR(priv->clks[1]);
I'd really use temporary variable here.

Something like

if (IS_ERR()) {
err = PTR_ERR();
if (err != -ENOENT)
return err;
priv->clks[1] = NULL;
}

But this is -cip, so no need to fix it here, but consider fixing it in
mainline.
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Join cip-dev@lists.cip-project.org to automatically receive all group messages.