[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <07ec49cb-e5b7-72bc-f563-2d2d7c2e2c0d@gmail.com>
Date: Fri, 9 Nov 2018 08:56:40 -0800
From: Frank Rowand <frowand.list@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
Matthias Brugger <matthias.bgg@...il.com>
Cc: Stephen Boyd <sboyd@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-clk <linux-clk@...r.kernel.org>,
linux-mediatek@...ts.infradead.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, ryder.lee@...iatek.com,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH 1/4] of/device: Add a way to probe drivers by match data
On 11/9/18 2:36 AM, Geert Uytterhoeven wrote:
> Hi Matthias,
>
> On Fri, Nov 9, 2018 at 11:29 AM Matthias Brugger <matthias.bgg@...il.com> wrote:
>> On 08/11/2018 18:58, Stephen Boyd wrote:
>>> Quoting Matthias Brugger (2018-11-08 00:29:46)
>>>> On 06/11/2018 19:36, Stephen Boyd wrote:
>>>>> +int platform_driver_probe_by_of_match_data(struct platform_device *pdev)
>>>>> +{
>>>>> + int (*probe_func)(struct platform_device *pdev);
>>>>> +
>>>>> + probe_func = of_device_get_match_data(&pdev->dev);
>>>>
>>>> Shouldn't we check if probe_func is not NULL?
>>>
>>> Is the oops from the NULL pointer deref insufficient?
>>
>> Do you think we should crash the machine if someone uses the call wrongly? Or
>> should we provide the possibility to error out on the caller side?
>
> I believe that would be a bug in the driver, to be discovered ASAP.
> So yes, please do crash ;-)
This is one of Linus' pet peeves. He does not think crashing the
machine is the proper choice (as a general statement).
-Frank
>
> Gr{oetje,eeting}s,
>
> Geert
>
Powered by blists - more mailing lists