[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFcVECKqatju7P7WAR0cLGePkAvDcJ8Sb-KKxvjpvtNuEtWSWw@mail.gmail.com>
Date: Wed, 20 Mar 2019 16:16:22 +0530
From: Harini Katakam <harinik@...inx.com>
To: Claudiu Beznea <Claudiu.Beznea@...rochip.com>
Cc: Harini Katakam <harini.katakam@...inx.com>,
Nicolas Ferre <Nicolas.Ferre@...rochip.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Michal Simek <michal.simek@...inx.com>
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@...rochip.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;
> > }
Powered by blists - more mailing lists