linux-stable/drivers/hwtracing/stm
Wang Hui 927633a6d2 stm class: Fix module init return on allocation failure
In stm_heartbeat_init(): return value gets reset after the first
iteration by stm_source_register_device(), so allocation failures
after that will, after a clean up, return success. Fix that.

Fixes: 1192918530 ("stm class: Add heartbeat stm source device")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hui <john.wanghui@huawei.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20210115195917.3184-2-alexander.shishkin@linux.intel.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:54:37 +01:00
..
console.c stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:17 +03:00
core.c compat_ioctl: move drivers to compat_ptr_ioctl 2019-10-23 17:23:43 +02:00
dummy_stm.c stm class: Make dummy's master/channel ranges configurable 2018-03-28 18:47:18 +03:00
ftrace.c stm class: ftrace: Use different channel accroding to CPU 2020-10-05 12:43:54 +02:00
heartbeat.c stm class: Fix module init return on allocation failure 2021-01-21 18:54:37 +01:00
Kconfig stm class: ftrace: Change dependency to TRACING 2020-10-05 12:43:53 +02:00
Makefile stm class: Add MIPI SyS-T protocol support 2018-10-11 12:12:54 +02:00
p_basic.c stm class: Factor out default framing protocol 2018-10-11 12:12:54 +02:00
p_sys-t.c stm class: sys-t: Fix the use of time_after() 2020-03-18 11:32:55 +01:00
policy.c stm class: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
stm.h stm class: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00