Messages in this thread | | | From | Harini Katakam <> | Date | Wed, 20 Mar 2019 16:16:22 +0530 | Subject | Re: [RFC PATCH] net: macb: Add null check for PCLK and HCLK |
| |
Hi Claudiu,
On Tue, Mar 19, 2019 at 9:51 PM <Claudiu.Beznea@microchip.com> wrote: > > > > On 19.03.2019 07:54, Harini Katakam wrote: <snip> > > - if (IS_ERR(*pclk)) { > > + if (IS_ERR(*pclk) || (*pclk == NULL)) { > > You can use IS_ERR_OR_NULL() macro. > Yes will fix, thanks. Also the error code from this function will end up being 0 below even if pointer is NULL. Will fix that.
Regards, Harini
> > err = PTR_ERR(*pclk); > > dev_err(&pdev->dev, "failed to get macb_clk (%u)\n", err); > > return err; > > }
| |