linux-stable/drivers/hwtracing
Alexander Shishkin 512592779a intel_th: Fix a double put_device() in error path
Commit a753bfcfdb ("intel_th: Make the switch allocate its subdevices")
factored out intel_th_subdevice_alloc() from intel_th_populate(), but got
the error path wrong, resulting in two instances of a double put_device()
on a freshly initialized, but not 'added' device.

Fix this by only doing one put_device() in the error path.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: a753bfcfdb ("intel_th: Make the switch allocate its subdevices")
Reported-by: Wen Yang <wenyang@linux.alibaba.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@vger.kernel.org # v4.14+
Link: https://lore.kernel.org/r/20191120130806.44028-2-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20 14:37:29 +01:00
..
coresight coresight: replicator: Fix missing spin_lock_init() 2019-11-19 19:18:15 +01:00
intel_th intel_th: Fix a double put_device() in error path 2019-11-20 14:37:29 +01:00
stm stm class: Lose the protocol driver when dropping its reference 2019-11-14 14:48:48 +08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00