lkml.org 
[lkml]   [2017]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [mfd] question about potential null pointer dereference
Hi guys,

Quoting Charles Keepax <ckeepax@opensource.wolfsonmicro.com>:

> On Wed, May 24, 2017 at 08:22:58AM +0100, Lee Jones wrote:
>> On Tue, 23 May 2017, Gustavo A. R. Silva wrote:
>> > The issue here is that there is a potential NULL pointer
>> dereference at line
>> > 37, in case function of_match_device() returns NULL.
>> >
>> > Maybe a patch like the following could be applied in order to avoid any
>> > chance of a NULL pointer dereference:
>>
>> I do not believe it's possible for of_match_device() to return NULL in
>> this case.
>>
>> However, if you wanted to submit a patch checking for it, it would not
>> be rejected.
>
> Personally I would prefer to have a NULL pointer check in there.
>

I'll send a patch shortly.

Thank you both.
--
Gustavo A. R. Silva




\
 
 \ /
  Last update: 2017-05-24 10:20    [W:0.067 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site