Commit aaa90d07 authored by Pei Xiao's avatar Pei Xiao Committed by Jonathan Cameron
Browse files

iio: test : check null return of kunit_kmalloc in iio_rescale_test_scale



kunit_kmalloc may fail, return value might be NULL and will cause
NULL pointer dereference.Add KUNIT_ASSERT_NOT_ERR_OR_NULL fix it.

Signed-off-by: default avatarPei Xiao <xiaopei01@kylinos.cn>
Fixes: 8e74a48d ("iio: test: add basic tests for the iio-rescale driver")
Link: https://patch.msgid.link/ecd56a85e54a96c2f0313c114075a21a76071ea2.1730259869.git.xiaopei01@kylinos.cn


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 4be339af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment