linux-stable/drivers/hwtracing
Wang Hui a8fade5946 stm class: Fix module init return on allocation failure
commit 927633a6d2 upstream.

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-27 11:47:50 +01:00
..
coresight coresight: etb10: Fix possible NULL ptr dereference in etb_enable_perf() 2020-12-30 11:50:59 +01:00
intel_th intel_th: pci: Add Alder Lake-P support 2021-01-27 11:47:49 +01:00
stm stm class: Fix module init return on allocation failure 2021-01-27 11:47:50 +01:00
Kconfig