linux/drivers/hwtracing/intel_th
Colin Ian King 063f097fd6 intel_th: msu: Fix missing allocation failure check on a kstrndup
Commit 615c164da0 ("intel_th: msu: Introduce buffer interface") forgot
to add a NULL pointer check for the value returned from kstrdup(), which
will be troublesome if the allocation fails.

Fix that by adding the check.

Addresses-Coverity: ("Dereference null return")
Fixes: 615c164da0 ("intel_th: msu: Introduce buffer interface")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
[alexander.shishkin: amended the commit message]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/lkml/20190726120421.9650-1-colin.king@canonical.com/
Link: https://lore.kernel.org/r/20191028070651.9770-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-04 15:01:23 +01:00
..
acpi.c intel_th: Communicate IRQ via resource 2019-05-03 18:14:29 +02:00
core.c drivers: Introduce device lookup variants by device type 2019-07-30 13:07:42 +02:00
debug.c intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:19 +03:00
debug.h intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:19 +03:00
gth.c intel_th: gth: Fix the window switching sequence 2019-11-04 15:01:22 +01:00
gth.h intel_th: Add switch triggering support 2019-05-03 18:16:21 +02:00
intel_th.h intel_th: Add switch triggering support 2019-05-03 18:16:21 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile intel_th: msu-sink: An example msu buffer "sink" 2019-07-25 13:03:18 +02:00
msu-sink.c intel_th: msu-sink: An example msu buffer "sink" 2019-07-25 13:03:18 +02:00
msu.c intel_th: msu: Fix missing allocation failure check on a kstrndup 2019-11-04 15:01:23 +01:00
msu.h Merge 5.3-rc5 into char-misc-next 2019-08-19 07:11:53 +02:00
pci.c intel_th: pci: Add Tiger Lake support 2019-08-28 22:29:02 +02:00
pti.c intel_th: pti: Use sysfs_match_string() helper 2019-02-21 15:04:36 +02:00
pti.h intel_th: Use the correct style for SPDX License Identifier 2019-07-30 19:41:53 +02:00
sth.c intel_th: Mark expected switch fall-throughs 2019-02-21 15:04:36 +02:00
sth.h intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:19 +03:00