kernel_optimize_test/drivers/iio
Xiaoke Wang 8caa4b7d41 iio: dummy: iio_simple_dummy: check the return value of kstrdup()
[ Upstream commit ba93642188a6fed754bf7447f638bc410e05a929 ]

kstrdup() is also a memory allocation-related function, it returns NULL
when some memory errors happen. So it is better to check the return
value of it so to catch the memory error in time. Besides, there should
have a kfree() to clear up the allocation if we get a failure later in
this function to prevent memory leak.

Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_C920CFCC33B9CC1C63141FE1334A39FF8508@qq.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:32:41 +02:00
..
accel iio: mma8452: Fix probe failing when an i2c_device_id is used 2022-04-08 14:40:24 +02:00
adc iio: adc: sc27xx: Fine tune the scale calibration values 2022-06-14 18:32:32 +02:00
afe iio: afe: rescale: use s64 for temporary scale calculations 2022-04-08 14:39:49 +02:00
amplifiers
buffer
chemical
common iio: ssp_sensors: fix error code in ssp_print_mcu_debug() 2021-10-20 11:45:02 +02:00
dac iio: dac: ad5446: Fix read_raw not returning set value 2022-05-09 09:04:57 +02:00
dummy iio: dummy: iio_simple_dummy: check the return value of kstrdup() 2022-06-14 18:32:41 +02:00
frequency
gyro iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
health
humidity iio: humidity: hdc100x: Add margin to the conversion time 2021-08-18 08:59:04 +02:00
imu iio:imu:bmi160: disable regulator in error path 2022-05-09 09:05:00 +02:00
light iio: ltr501: Don't return error code in trigger handler 2021-12-14 11:32:44 +01:00
magnetometer iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-09 09:04:58 +02:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
proximity iio: proximity: vl53l0x: Fix return value check of wait_for_completion_timeout 2022-06-14 18:32:32 +02:00
resolver
temperature iio: ltc2983: fix device probe 2021-09-18 13:40:08 +02:00
trigger iio: trigger: stm32-timer: fix MODULE_ALIAS 2021-12-14 11:32:44 +01:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix reference counting 2021-12-14 11:32:44 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: make a best effort on offset calculation 2022-04-08 14:39:50 +02:00
Kconfig
Makefile
TODO