Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Gustavo A. R. Silva
Quoting Peter Rosin : On 2017-07-07 06:35, Gustavo A. R. Silva wrote: Hi Peter, Quoting Peter Rosin : On 2017-07-07 00:08, Gustavo A. R. Silva wrote: Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. Right,

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Gustavo A. R. Silva
Quoting Peter Rosin : On 2017-07-07 06:35, Gustavo A. R. Silva wrote: Hi Peter, Quoting Peter Rosin : On 2017-07-07 00:08, Gustavo A. R. Silva wrote: Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. Right, thanks for finding that one!

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Peter Rosin
On 2017-07-07 06:35, Gustavo A. R. Silva wrote: > Hi Peter, > > Quoting Peter Rosin : > >> On 2017-07-07 00:08, Gustavo A. R. Silva wrote: >>> Check return value from call to devm_kzalloc() >>> in order to prevent a NULL pointer dereference. >> >> Right, thanks for finding that

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Peter Rosin
On 2017-07-07 06:35, Gustavo A. R. Silva wrote: > Hi Peter, > > Quoting Peter Rosin : > >> On 2017-07-07 00:08, Gustavo A. R. Silva wrote: >>> Check return value from call to devm_kzalloc() >>> in order to prevent a NULL pointer dereference. >> >> Right, thanks for finding that one! There's

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Gustavo A. R. Silva
Hi Peter, Quoting Peter Rosin : On 2017-07-07 00:08, Gustavo A. R. Silva wrote: Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. Right, thanks for finding that one! There's another one inside the for loop that is just starting

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Gustavo A. R. Silva
Hi Peter, Quoting Peter Rosin : On 2017-07-07 00:08, Gustavo A. R. Silva wrote: Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. Right, thanks for finding that one! There's another one inside the for loop that is just starting in the context of

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Peter Rosin
On 2017-07-07 00:08, Gustavo A. R. Silva wrote: > Check return value from call to devm_kzalloc() > in order to prevent a NULL pointer dereference. Right, thanks for finding that one! There's another one inside the for loop that is just starting in the context of this patch. Care to fix checking

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Peter Rosin
On 2017-07-07 00:08, Gustavo A. R. Silva wrote: > Check return value from call to devm_kzalloc() > in order to prevent a NULL pointer dereference. Right, thanks for finding that one! There's another one inside the for loop that is just starting in the context of this patch. Care to fix checking

[PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Gustavo A. R. Silva
Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected using Coccinelle and the following semantic patch: @@ expression x; identifier fld; @@ * x = devm_kzalloc(...); ... when != x == NULL x->fld Signed-off-by: Gustavo A. R.

[PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Gustavo A. R. Silva
Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected using Coccinelle and the following semantic patch: @@ expression x; identifier fld; @@ * x = devm_kzalloc(...); ... when != x == NULL x->fld Signed-off-by: Gustavo A. R.