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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux