[PATCH v2] ARM: davinci: da8xx: Fix sleeping function called from invalid context
Arnd Bergmann
arnd at arndb.de
Thu Dec 1 06:59:17 PST 2016
On Thursday, December 1, 2016 7:47:12 PM CET Sekhar Nori wrote:
>
> > @@ -287,9 +281,15 @@ int __init da8xx_register_usb20_phy_clk(bool use_usb_refclkin)
> > struct clk *parent;
> > int ret = 0;
> >
> > + usb20_clk = clk_get(&da8xx_usb20_dev.dev, "usb20");
> > + if (IS_ERR(usb20_clk))
> > + return PTR_ERR(parent);
>
> Typo here. Should be PTR_ERR(usb20_clk)
I found that doing
err = PTR_ERR_OR_ZERO(usb20_clk);
if (err)
return err;
is less error-prone and leads to better object code.
Arnd
More information about the linux-arm-kernel
mailing list