Re: [PATCH] ASoC: rsnd: Fix possible NULL pointer dereference

2017-04-20 Thread Marek Vasut
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

Re: [PATCH] ASoC: rsnd: Fix possible NULL pointer dereference

2017-04-20 Thread Kuninori Morimoto
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

[PATCH] ASoC: rsnd: Fix possible NULL pointer dereference

2017-04-20 Thread Marek Vasut
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