diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-07-06 23:53:11 -0500 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-09-03 18:10:29 +0100 |
commit | dd92d5ea20ef8a42be7aeda08c669c586c730451 (patch) | |
tree | 0f5a81bb6c4116cf56d9ae2f09f3008b78a5bb6c /arch/mips/kernel/mips-mt.c | |
parent | 9d2f715d592eb4d0e643f6219f4a160fbd62934d (diff) |
iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values
Check return values from call to devm_kzalloc() and devm_kmemup()
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
Fixes: 7ba9df54b091 ("iio: multiplexer: new iio category and iio-mux driver")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'arch/mips/kernel/mips-mt.c')
0 files changed, 0 insertions, 0 deletions