Re: [PATCH] phy: Renesas R-Car gen3 PCIe PHY driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sergei,

On Mon, Apr 9, 2018 at 5:57 PM, Sergei Shtylyov
<sergei.shtylyov@xxxxxxxxxxxxxxxxxx> wrote:
> On 04/09/2018 12:46 PM, Geert Uytterhoeven wrote:
>>> +static int rcar_gen3_phy_pcie_probe(struct platform_device *pdev)
>>> +{
>>> +       struct device *dev = &pdev->dev;
>>> +       struct phy_provider *provider;
>>> +       struct rcar_gen3_phy *phy;
>>> +       struct resource *res;
>>> +       void __iomem *base;
>>> +       int error;
>>> +
>>> +       if (!dev->of_node) {
>>> +               dev_err(dev,
>>> +                       "This driver must only be instantiated from the device tree\n");
>>> +               return -EINVAL;
>>> +       }
>>
>> Do we need this check? Just go bang, like most other DT-only drivers do?
>
>    You mean NULL pointer dereference?

Yep. (S)he who instantiates a "phy_rcar_gen3_pcie" device without DT is
bound to die.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux