selftests: nci: Fix the wrong condition
authorBongsu Jeon <bongsu.jeon@samsung.com>
Tue, 17 Aug 2021 13:28:15 +0000 (06:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:14 +0000 (13:42 +0200)
commit881d24d153dc7891dd7eee5cd40cc3b5f66aabf7
tree94db2db1253e394aa956f52e74bd857d0fb149ee
parente0921e72be17b5b9cf90573327da9a5beac03bbb
selftests: nci: Fix the wrong condition

[ Upstream commit 1d5b8d01db98abb8c176838fad73287366874582 ]

memcpy should be executed only in case nla_len's value is greater than 0.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/nci/nci_dev.c