selftests: firmware: Fix ignored return val of asprintf() warn
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 8 Jul 2021 03:18:27 +0000 (21:18 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:20 +0000 (13:40 +0200)
commitb4f5c9454dfcfee9393f547932eff81a2d9d50bc
tree09e99f6984cd5e09304b8946b7168ea21b762016
parente944a221262e9e9f445ce88f79886476d8baec16
selftests: firmware: Fix ignored return val of asprintf() warn

[ Upstream commit fe968ca2cac91888310b143a483123c84906e3fc ]

Fix the following ingonred return val of asprintf() warn during
build:

cc -Wall -O2    fw_namespace.c  -o ../tools/testing/selftests/firmware/fw_namespace
fw_namespace.c: In function ‘main’:
fw_namespace.c:132:2: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  132 |  asprintf(&fw_path, "/lib/firmware/%s", fw_name);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210708031827.51293-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/firmware/fw_namespace.c