Colin Ian King 704a940d55 thunderbolt: fix memory leak of object sw
In the case where the call tb_switch_exceeds_max_depth is true
the error reurn path leaks memory in sw.  Fix this by setting
the return error code to -EADDRNOTAVAIL and returning via the
error exit path err_free_sw_ports to free sw. sw has been kzalloc'd
so the free of the NULL sw->ports is fine.

Addresses-Coverity: ("Resource leak")
Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20191220220526.11307-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 15:37:41 +01:00
2020-01-13 12:11:40 +01:00
2019-12-18 17:17:36 -08:00
2020-01-13 12:11:40 +01:00
2020-01-10 13:25:24 -08:00
2020-01-13 12:11:40 +01:00
2020-01-02 16:15:33 -08:00
2019-12-09 10:36:44 -08:00
2020-01-11 15:33:48 -08:00
2020-01-08 15:57:35 -08:00
2020-01-03 11:21:25 -08:00
2020-01-04 19:28:30 -08:00
2020-01-10 11:52:36 -08:00
2020-01-13 12:11:40 +01:00
2019-12-22 13:18:15 +01:00
2019-10-29 04:43:29 -06:00
2020-01-13 12:11:40 +01:00
2020-01-12 16:55:08 -08:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 5.7 GiB
Languages
C 97.6%
Assembly 1%
Shell 0.5%
Python 0.3%
Makefile 0.3%