linux-stable/drivers/hwtracing/coresight
Miaoqian Lin 412225b329 coresight: syscfg: Fix memleak on registration failure in cscfg_create_device
commit cfa5dbcdd7 upstream.

device_register() calls device_initialize(),
according to doc of device_initialize:

    Use put_device() to give up your reference instead of freeing
    * @dev directly once you have called this function.

To prevent potential memleak, use put_device() for error handling.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Fixes: 85e2414c51 ("coresight: syscfg: Initial coresight system configuration")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220124124121.8888-1-linmq006@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 13:57:14 +02:00
..
Kconfig coresight: cpu-debug: Control default behavior via Kconfig 2021-10-27 11:44:30 -06:00
Makefile coresight: syscfg: Add initial configfs support 2021-08-18 22:33:28 +02:00
coresight-catu.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-catu.h coresight: tmc-etr: Add function to register catu ops 2020-09-28 19:47:42 +02:00
coresight-cfg-afdo.c coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-cfg-preload.c coresight: configuration: Update API to introduce load owner concept 2021-11-26 11:27:21 -07:00
coresight-cfg-preload.h coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-config.c coresight: config: Add configuration and feature generic functions 2021-08-18 22:33:27 +02:00
coresight-config.h coresight: configuration: Update API to permit dynamic load/unload 2021-11-26 11:27:35 -07:00
coresight-core.c coresight: core: Fix typo in a comment 2021-12-13 11:54:07 -07:00
coresight-cpu-debug.c coresight: cpu-debug: Control default behavior via Kconfig 2021-10-27 11:44:30 -06:00
coresight-cti-core.c coresight: cti: Correct the parameter for pm_runtime_put 2021-10-27 11:44:26 -06:00
coresight-cti-platform.c coresight: cti: Reduce scope for the variable 'cs_fwnode' in cti_plat_create_connection() 2021-02-04 17:00:32 +01:00
coresight-cti-sysfs.c coresight: cti: Initialize dynamic sysfs attributes 2020-10-29 20:10:25 +01:00
coresight-cti.h coresight: Include required headers in C files 2020-05-19 16:31:18 +02:00
coresight-etb10.c coresight: Update comments for removing cs_etm_find_snapshot() 2021-10-27 11:44:50 -06:00
coresight-etm-cp14.c
coresight-etm-perf.c coresight: etm-pmu: Ensure the AUX handle is valid 2021-10-27 11:45:20 -06:00
coresight-etm-perf.h coresight: etm-perf: Update to activate selected configuration 2021-08-18 22:33:28 +02:00
coresight-etm.h
coresight-etm3x-core.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-etm3x-sysfs.c
coresight-etm4x-cfg.c coresight: etm4x: Add complex configuration handlers to etmv4 2021-08-18 22:33:28 +02:00
coresight-etm4x-cfg.h coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-etm4x-core.c coresight: configfs: Allow configfs to activate configuration 2021-11-26 11:34:27 -07:00
coresight-etm4x-sysfs.c coresight: Fix TRCCONFIGR.QE sysfs interface 2022-04-08 13:57:14 +02:00
coresight-etm4x.h coresight: etm4x: Use Trace Filtering controls dynamically 2021-10-27 11:45:18 -06:00
coresight-funnel.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-platform.c coresight: Do not scan for graph if none is present 2021-04-06 16:05:37 -06:00
coresight-priv.h coresight: core: Add support for dedicated percpu sinks 2021-04-06 16:05:38 -06:00
coresight-replicator.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-self-hosted-trace.h coresight: trbe: Prohibit trace before disabling TRBE 2021-10-27 11:45:33 -06:00
coresight-stm.c coresight: Use devm_bitmap_zalloc when applicable 2021-11-16 10:13:21 -07:00
coresight-syscfg-configfs.c coresight: configfs: Allow configfs to activate configuration 2021-11-26 11:34:27 -07:00
coresight-syscfg-configfs.h coresight: configfs: Allow configfs to activate configuration 2021-11-26 11:34:27 -07:00
coresight-syscfg.c coresight: syscfg: Fix memleak on registration failure in cscfg_create_device 2022-04-08 13:57:14 +02:00
coresight-syscfg.h coresight: configfs: Allow configfs to activate configuration 2021-11-26 11:34:27 -07:00
coresight-sysfs.c coresight: Export global symbols 2020-09-28 19:47:40 +02:00
coresight-tmc-core.c coresight: tmc: Configure AXI write burst size 2021-10-27 11:44:34 -06:00
coresight-tmc-etf.c coresight: Update comments for removing cs_etm_find_snapshot() 2021-10-27 11:44:50 -06:00
coresight-tmc-etr.c coresight: tmc-etr: Speed up for bounce buffer in flat mode 2021-10-27 11:44:52 -06:00
coresight-tmc.h coresight: tmc: Configure AXI write burst size 2021-10-27 11:44:34 -06:00
coresight-tpiu.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-trbe.c coresight: trbe: Work around write to out of range 2021-10-27 11:46:01 -06:00
coresight-trbe.h coresight: sink: Add TRBE driver 2021-04-06 16:05:38 -06:00