]> www.infradead.org Git - users/dwmw2/linux.git/commit
thunderbolt: Fix to check for kmemdup failure
authorAditya Pakki <pakki001@umn.edu>
Wed, 20 Mar 2019 15:57:54 +0000 (10:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:47:34 +0000 (06:47 -0700)
commita63a05adafad1e22d7dc01ab4184977bc862a327
treef6df7399b071a430d427eb4ea3f211684fbb8ea2
parentdeb757e011a85f453e2da3fcf9f70da9f02b3458
thunderbolt: Fix to check for kmemdup failure

[ Upstream commit 2cc12751cf464a722ff57b54d17d30c84553f9c0 ]

Memory allocated via kmemdup might fail and return a NULL pointer.
This patch adds a check on the return value of kmemdup and passes the
error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thunderbolt/switch.c