On 04/21/2017 02:14 AM, Kuninori Morimoto wrote:
>
> Hi Marek
Hi!
>> In case the "clock-frequency" DT property is not present, the
>> of_find_property(np, "clock-frequency", NULL) will return NULL
>> and the subsequent req_size = prop->length / sizeof(u32); will
>> trigger a NULL pointer
Hi Marek
> In case the "clock-frequency" DT property is not present, the
> of_find_property(np, "clock-frequency", NULL) will return NULL
> and the subsequent req_size = prop->length / sizeof(u32); will
> trigger a NULL pointer dereference.
>
> This patch adds check for the NULL return value
In case the "clock-frequency" DT property is not present, the
of_find_property(np, "clock-frequency", NULL) will return NULL
and the subsequent req_size = prop->length / sizeof(u32); will
trigger a NULL pointer dereference.
This patch adds check for the NULL return value and propagates
the error